tasksource/leandojo huggingface dataset:
Theorem: lineMap_slope_lineMap_slope_lineMap
File: Mathlib/LinearAlgebra/AffineSpace/Slope.lean

tactic: obtain rfl | hab : a = b ∨ a ≠ b := Classical.em _
state_before: k : Type u_2
E : Type u_1
PE : Type u_3
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → PE
a b r : k
⊢ ↑(lineMap (slope f (↑(lineMap a b) r) b) (slope f a (↑(lineMap a b) r))) r = slope f a b

tactic: rw [slope_comm _ a, slope_comm _ a, slope_comm _ _ b]
state_before: case inr
k : Type u_2
E : Type u_1
PE : Type u_3
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → PE
a b r : k
hab : a ≠ b
⊢ ↑(lineMap (slope f (↑(lineMap a b) r) b) (slope f a (↑(lineMap a b) r))) r = slope f a b

tactic: convert lineMap_slope_slope_sub_div_sub f b (lineMap a b r) a hab.symm using 2
state_before: case inr
k : Type u_2
E : Type u_1
PE : Type u_3
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → PE
a b r : k
hab : a ≠ b
⊢ ↑(lineMap (slope f b (↑(lineMap a b) r)) (slope f (↑(lineMap a b) r) a)) r = slope f b a

tactic: rw [lineMap_apply_ring, eq_div_iff (sub_ne_zero.2 hab), sub_mul, one_mul, mul_sub, ← sub_sub,
  sub_sub_cancel]
state_before: case h.e'_2.h.e'_6
k : Type u_2
E : Type u_1
PE : Type u_3
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → PE
a b r : k
hab : a ≠ b
⊢ r = (a - ↑(lineMap a b) r) / (a - b)

tactic: simp
state_before: case inl
k : Type u_2
E : Type u_1
PE : Type u_3
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → PE
a r : k
⊢ ↑(lineMap (slope f (↑(lineMap a a) r) a) (slope f a (↑(lineMap a a) r))) r = slope f a a
Theorem: IsGroupHom.inv_iff_ker'
File: Mathlib/Deprecated/Subgroup.lean

tactic: rw [mem_ker]
state_before: G : Type u_1
H : Type u_2
A : Type ?u.85096
a✝ a₁ a₂ b✝ c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
a b : G
⊢ f a = f b ↔ a⁻¹ * b ∈ ker f

tactic: exact one_iff_ker_inv' hf _ _
state_before: G : Type u_1
H : Type u_2
A : Type ?u.85096
a✝ a₁ a₂ b✝ c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
a b : G
⊢ f a = f b ↔ f (a⁻¹ * b) = 1
Theorem: Subgroup.MemRightTransversals.toFun_mul_inv_mem
File: Mathlib/GroupTheory/Complement.lean

tactic: rw [mul_inv_rev, inv_inv]
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hS : S ∈ rightTransversals ↑H
g : G
⊢ (g * (↑(toFun hS g))⁻¹)⁻¹ = ↑(toFun hS g) * g⁻¹
Theorem: CategoryTheory.Limits.CokernelCofork.π_eq_zero
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: simp [Cofork.app_zero_eq_comp_π_right]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
s : CokernelCofork f
⊢ s.ι.app zero = 0
Theorem: LocallyFinite.nhdsWithin_iUnion
File: Mathlib/Topology/LocallyFinite.lean

tactic: rcases hf a with ⟨U, haU, hfin⟩
state_before: ι : Type u_1
ι' : Type ?u.3024
α : Type ?u.3027
X : Type u_2
Y : Type ?u.3033
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
f g : ι → Set X
hf : LocallyFinite f
a : X
⊢ 𝓝[⋃ (i : ι), f i] a = ⨆ (i : ι), 𝓝[f i] a

tactic: refine le_antisymm ?_ (Monotone.le_map_iSup fun _ _ ↦ nhdsWithin_mono _)
state_before: case intro.intro
ι : Type u_1
ι' : Type ?u.3024
α : Type ?u.3027
X : Type u_2
Y : Type ?u.3033
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
f g : ι → Set X
hf : LocallyFinite f
a : X
U : Set X
haU : U ∈ 𝓝 a
hfin : Set.Finite {i | Set.Nonempty (f i ∩ U)}
⊢ 𝓝[⋃ (i : ι), f i] a = ⨆ (i : ι), 𝓝[f i] a

tactic: calc
  𝓝[⋃ i, f i] a = 𝓝[⋃ i, f i ∩ U] a := by
    rw [← iUnion_inter, ← nhdsWithin_inter_of_mem' (nhdsWithin_le_nhds haU)]
  _ = 𝓝[⋃ i ∈ {j | (f j ∩ U).Nonempty}, (f i ∩ U)] a := by
    simp only [mem_setOf_eq, iUnion_nonempty_self]
  _ = ⨆ i ∈ {j | (f j ∩ U).Nonempty}, 𝓝[f i ∩ U] a := nhdsWithin_biUnion hfin _ _
  _ ≤ ⨆ i, 𝓝[f i ∩ U] a := iSup₂_le_iSup _ _
  _ ≤ ⨆ i, 𝓝[f i] a := iSup_mono fun i ↦ nhdsWithin_mono _ <| inter_subset_left _ _
state_before: case intro.intro
ι : Type u_1
ι' : Type ?u.3024
α : Type ?u.3027
X : Type u_2
Y : Type ?u.3033
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
f g : ι → Set X
hf : LocallyFinite f
a : X
U : Set X
haU : U ∈ 𝓝 a
hfin : Set.Finite {i | Set.Nonempty (f i ∩ U)}
⊢ 𝓝[⋃ (i : ι), f i] a ≤ ⨆ (i : ι), 𝓝[f i] a

tactic: rw [← iUnion_inter, ← nhdsWithin_inter_of_mem' (nhdsWithin_le_nhds haU)]
state_before: ι : Type u_1
ι' : Type ?u.3024
α : Type ?u.3027
X : Type u_2
Y : Type ?u.3033
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
f g : ι → Set X
hf : LocallyFinite f
a : X
U : Set X
haU : U ∈ 𝓝 a
hfin : Set.Finite {i | Set.Nonempty (f i ∩ U)}
⊢ 𝓝[⋃ (i : ι), f i] a = 𝓝[⋃ (i : ι), f i ∩ U] a

tactic: simp only [mem_setOf_eq, iUnion_nonempty_self]
state_before: ι : Type u_1
ι' : Type ?u.3024
α : Type ?u.3027
X : Type u_2
Y : Type ?u.3033
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
f g : ι → Set X
hf : LocallyFinite f
a : X
U : Set X
haU : U ∈ 𝓝 a
hfin : Set.Finite {i | Set.Nonempty (f i ∩ U)}
⊢ 𝓝[⋃ (i : ι), f i ∩ U] a = 𝓝[⋃ (i : ι) (_ : i ∈ {j | Set.Nonempty (f j ∩ U)}), f i ∩ U] a
Theorem: CategoryTheory.MorphismProperty.RespectsIso.cancel_left_isIso
File: Mathlib/CategoryTheory/MorphismProperty.lean

tactic: simpa using hP.1 (asIso f).symm (f ≫ g) h
state_before: C : Type u
inst✝² : Category C
D : Type ?u.13555
inst✝¹ : Category D
P : MorphismProperty C
hP : RespectsIso P
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : IsIso f
h : P (f ≫ g)
⊢ P g
Theorem: Cardinal.add_lt_of_lt
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rw [add_eq_self h]
state_before: a b c : Cardinal
hc : ℵ₀ ≤ c
h1 : a < c
h2 : b < c
h : ℵ₀ ≤ max a b
⊢ max a b + max a b < c

tactic: exact max_lt h1 h2
state_before: a b c : Cardinal
hc : ℵ₀ ≤ c
h1 : a < c
h2 : b < c
h : ℵ₀ ≤ max a b
⊢ max a b < c
Theorem: List.nthLe_permutations'Aux
File: Mathlib/Data/List/Perm.lean

tactic: induction' s with y s IH generalizing n
state_before: α : Type uu
β : Type vv
l₁ l₂ s : List α
x : α
n : ℕ
hn : n < length (permutations'Aux x s)
⊢ nthLe (permutations'Aux x s) n hn = insertNth n x s

tactic: simp only [length, zero_add, lt_one_iff] at hn
state_before: case nil
α : Type uu
β : Type vv
l₁ l₂ s : List α
x : α
n✝ : ℕ
hn✝ : n✝ < length (permutations'Aux x s)
n : ℕ
hn : n < length (permutations'Aux x [])
⊢ nthLe (permutations'Aux x []) n hn = insertNth n x []

tactic: simp [hn]
state_before: case nil
α : Type uu
β : Type vv
l₁ l₂ s : List α
x : α
n✝ : ℕ
hn✝¹ : n✝ < length (permutations'Aux x s)
n : ℕ
hn✝ : n < length (permutations'Aux x [])
hn : n = 0
⊢ nthLe (permutations'Aux x []) n hn✝ = insertNth n x []

tactic: cases n
state_before: case cons
α : Type uu
β : Type vv
l₁ l₂ s✝ : List α
x : α
n✝ : ℕ
hn✝ : n✝ < length (permutations'Aux x s✝)
y : α
s : List α
IH : ∀ (n : ℕ) (hn : n < length (permutations'Aux x s)), nthLe (permutations'Aux x s) n hn = insertNth n x s
n : ℕ
hn : n < length (permutations'Aux x (y :: s))
⊢ nthLe (permutations'Aux x (y :: s)) n hn = insertNth n x (y :: s)

tactic: simp [nthLe]
state_before: case cons.zero
α : Type uu
β : Type vv
l₁ l₂ s✝ : List α
x : α
n : ℕ
hn✝ : n < length (permutations'Aux x s✝)
y : α
s : List α
IH : ∀ (n : ℕ) (hn : n < length (permutations'Aux x s)), nthLe (permutations'Aux x s) n hn = insertNth n x s
hn : zero < length (permutations'Aux x (y :: s))
⊢ nthLe (permutations'Aux x (y :: s)) zero hn = insertNth zero x (y :: s)

tactic: simpa [nthLe] using IH _ _
state_before: case cons.succ
α : Type uu
β : Type vv
l₁ l₂ s✝ : List α
x : α
n : ℕ
hn✝ : n < length (permutations'Aux x s✝)
y : α
s : List α
IH : ∀ (n : ℕ) (hn : n < length (permutations'Aux x s)), nthLe (permutations'Aux x s) n hn = insertNth n x s
n✝ : ℕ
hn : succ n✝ < length (permutations'Aux x (y :: s))
⊢ nthLe (permutations'Aux x (y :: s)) (succ n✝) hn = insertNth (succ n✝) x (y :: s)
Theorem: concaveOn_of_deriv2_nonpos
File: Mathlib/Analysis/Calculus/MeanValue.lean

tactic: rwa [interior_interior]
state_before: E : Type ?u.457803
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.457899
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
D : Set ℝ
hD : Convex ℝ D
f : ℝ → ℝ
hf : ContinuousOn f D
hf' : DifferentiableOn ℝ f (interior D)
hf'' : DifferentiableOn ℝ (deriv f) (interior D)
hf''_nonpos : ∀ (x : ℝ), x ∈ interior D → (deriv^[2]) f x ≤ 0
⊢ DifferentiableOn ℝ (deriv f) (interior (interior D))

tactic: rwa [interior_interior]
state_before: E : Type ?u.457803
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.457899
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
D : Set ℝ
hD : Convex ℝ D
f : ℝ → ℝ
hf : ContinuousOn f D
hf' : DifferentiableOn ℝ f (interior D)
hf'' : DifferentiableOn ℝ (deriv f) (interior D)
hf''_nonpos : ∀ (x : ℝ), x ∈ interior D → (deriv^[2]) f x ≤ 0
⊢ ∀ (x : ℝ), x ∈ interior (interior D) → deriv (deriv f) x ≤ 0
Theorem: CategoryTheory.Functor.preservesZeroMorphisms_of_map_zero_object
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Zero.lean

tactic: rw [← Functor.map_comp, comp_zero]
state_before: C : Type u₁
inst✝⁵ : Category C
D : Type u₂
inst✝⁴ : Category D
inst✝³ : HasZeroObject C
inst✝² : HasZeroObject D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
F : C ⥤ D
i : F.obj 0 ≅ 0
X Y : C
⊢ F.map 0 = F.map 0 ≫ F.map 0

tactic: rw [Iso.hom_inv_id, Category.id_comp]
state_before: C : Type u₁
inst✝⁵ : Category C
D : Type u₂
inst✝⁴ : Category D
inst✝³ : HasZeroObject C
inst✝² : HasZeroObject D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
F : C ⥤ D
i : F.obj 0 ≅ 0
X Y : C
⊢ F.map 0 ≫ F.map 0 = F.map 0 ≫ (i.hom ≫ i.inv) ≫ F.map 0

tactic: simp only [zero_of_to_zero i.hom, zero_comp, comp_zero]
state_before: C : Type u₁
inst✝⁵ : Category C
D : Type u₂
inst✝⁴ : Category D
inst✝³ : HasZeroObject C
inst✝² : HasZeroObject D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
F : C ⥤ D
i : F.obj 0 ≅ 0
X Y : C
⊢ F.map 0 ≫ (i.hom ≫ i.inv) ≫ F.map 0 = 0
Theorem: CategoryTheory.Iso.inv_comp_eq
File: Mathlib/CategoryTheory/Iso.lean

tactic: simp [H.symm]
state_before: C : Type u
inst✝ : Category C
X Y Z : C
α : X ≅ Y
f : X ⟶ Z
g : Y ⟶ Z
H : α.inv ≫ f = g
⊢ f = α.hom ≫ g

tactic: simp [H]
state_before: C : Type u
inst✝ : Category C
X Y Z : C
α : X ≅ Y
f : X ⟶ Z
g : Y ⟶ Z
H : f = α.hom ≫ g
⊢ α.inv ≫ f = g
Theorem: Int.mul_fdiv_cancel
File: Std/Data/Int/DivMod.lean

tactic: rw [fdiv_eq_ediv _ b0, mul_ediv_cancel _ H]
state_before: a b : Int
H : b ≠ 0
b0 : 0 ≤ b
⊢ fdiv (a * b) b = a

tactic: simp [Int.zero_mul]
state_before: a b x✝¹ : Int
x✝ : x✝¹ < 0
H : x✝¹ ≠ 0
b0 : ¬0 ≤ x✝¹
⊢ fdiv (0 * x✝¹) x✝¹ = 0
Theorem: Nat.multichoose_one_right
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: induction' n with n IH
state_before: n : ℕ
⊢ multichoose n 1 = n

tactic: simp [multichoose_succ_succ n 0, IH]
state_before: case succ
n : ℕ
IH : multichoose n 1 = n
⊢ multichoose (succ n) 1 = succ n

tactic: simp
state_before: case zero

⊢ multichoose zero 1 = zero
Theorem: ne_zero_of_dvd_ne_zero
File: Mathlib/Algebra/GroupWithZero/Divisibility.lean

tactic: rcases h₂ with ⟨u, rfl⟩
state_before: α : Type u_1
inst✝ : MonoidWithZero α
p q : α
h₁ : q ≠ 0
h₂ : p ∣ q
⊢ p ≠ 0

tactic: exact left_ne_zero_of_mul h₁
state_before: case intro
α : Type u_1
inst✝ : MonoidWithZero α
p u : α
h₁ : p * u ≠ 0
⊢ p ≠ 0
Theorem: AffineSubspace.isConnected_setOf_sSameSide
File: Mathlib/Analysis/Convex/Side.lean

tactic: obtain ⟨p, hp⟩ := h
state_before: R : Type ?u.472035
V : Type u_1
V' : Type ?u.472041
P : Type u_2
P' : Type ?u.472047
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
hx : ¬x ∈ s
h : Set.Nonempty ↑s
⊢ IsConnected {y | SSameSide s x y}

tactic: haveI : Nonempty s := ⟨⟨p, hp⟩⟩
state_before: case intro
R : Type ?u.472035
V : Type u_1
V' : Type ?u.472041
P : Type u_2
P' : Type ?u.472047
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
hx : ¬x ∈ s
p : P
hp : p ∈ ↑s
⊢ IsConnected {y | SSameSide s x y}

tactic: rw [setOf_sSameSide_eq_image2 hx hp, ← Set.image_prod]
state_before: case intro
R : Type ?u.472035
V : Type u_1
V' : Type ?u.472041
P : Type u_2
P' : Type ?u.472047
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
hx : ¬x ∈ s
p : P
hp : p ∈ ↑s
this : Nonempty { x // x ∈ s }
⊢ IsConnected {y | SSameSide s x y}

tactic: refine' (isConnected_Ioi.prod (isConnected_iff_connectedSpace.2 _)).image _
  ((continuous_fst.smul continuous_const).vadd continuous_snd).continuousOn
state_before: case intro
R : Type ?u.472035
V : Type u_1
V' : Type ?u.472041
P : Type u_2
P' : Type ?u.472047
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
hx : ¬x ∈ s
p : P
hp : p ∈ ↑s
this : Nonempty { x // x ∈ s }
⊢ IsConnected ((fun x_1 => x_1.fst • (x -ᵥ p) +ᵥ x_1.snd) '' Set.Ioi 0 ×ˢ ↑s)

tactic: convert AddTorsor.connectedSpace s.direction s
state_before: case intro
R : Type ?u.472035
V : Type u_1
V' : Type ?u.472041
P : Type u_2
P' : Type ?u.472047
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
hx : ¬x ∈ s
p : P
hp : p ∈ ↑s
this : Nonempty { x // x ∈ s }
⊢ ConnectedSpace ↑↑s
Theorem: Set.PairwiseDisjoint.image_of_le
File: Mathlib/Data/Set/Pairwise/Basic.lean

tactic: rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ h
state_before: α : Type u_1
β : Type ?u.36078
γ : Type ?u.36081
ι : Type u_2
ι' : Type ?u.36087
r p q : α → α → Prop
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
s t : Set ι
f g✝ : ι → α
hs : PairwiseDisjoint s f
g : ι → ι
hg : f ∘ g ≤ f
⊢ PairwiseDisjoint (g '' s) f

tactic: exact (hs ha hb <| ne_of_apply_ne _ h).mono (hg a) (hg b)
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.36078
γ : Type ?u.36081
ι : Type u_2
ι' : Type ?u.36087
r p q : α → α → Prop
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
s t : Set ι
f g✝ : ι → α
hs : PairwiseDisjoint s f
g : ι → ι
hg : f ∘ g ≤ f
a : ι
ha : a ∈ s
b : ι
hb : b ∈ s
h : g a ≠ g b
⊢ (Disjoint on f) (g a) (g b)
Theorem: Zsqrtd.coe_int_val
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: simp [ext]
state_before: d n : ℤ
⊢ ↑n = { re := n, im := 0 }
Theorem: Units.exists0'
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: simp_rw [val_mk0]
state_before: α : Type ?u.14573
M₀ : Type ?u.14576
G₀ : Type u_1
M₀' : Type ?u.14582
G₀' : Type ?u.14585
F : Type ?u.14588
F' : Type ?u.14591
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b : G₀
p : (g : G₀) → g ≠ 0 → Prop
⊢ (∃ g hg, p g hg) ↔ ∃ g hg, p ↑(mk0 g hg) (_ : ↑(mk0 g hg) ≠ 0)
Theorem: Complex.cpow_conj
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

tactic: rw [conj_cpow _ _ hx, conj_conj]
state_before: x n : ℂ
hx : arg x ≠ π
⊢ x ^ ↑(starRingEnd ℂ) n = ↑(starRingEnd ((fun x => ℂ) x)) (↑(starRingEnd ℂ) x ^ n)
Theorem: InnerProductGeometry.norm_add_eq_add_norm_iff_angle_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: refine' ⟨fun h => _, norm_add_eq_add_norm_of_angle_eq_zero⟩
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ ‖x + y‖ = ‖x‖ + ‖y‖ ↔ angle x y = 0

tactic: rw [← inner_eq_mul_norm_iff_angle_eq_zero hx hy]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x + y‖ = ‖x‖ + ‖y‖
⊢ angle x y = 0

tactic: obtain ⟨hxy₁, hxy₂⟩ := norm_nonneg (x + y), add_nonneg (norm_nonneg x) (norm_nonneg y)
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x + y‖ = ‖x‖ + ‖y‖
⊢ inner x y = ‖x‖ * ‖y‖

tactic: rw [← sq_eq_sq hxy₁ hxy₂, norm_add_pow_two_real] at h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h : ‖x + y‖ = ‖x‖ + ‖y‖
hxy₁ : 0 ≤ ‖x + y‖
hxy₂ : 0 ≤ ‖x‖ + ‖y‖
⊢ inner x y = ‖x‖ * ‖y‖

tactic: calc
  ⟪x, y⟫ = ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2 := by linarith
  _ = ‖x‖ * ‖y‖ := by ring
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h✝ : ‖x + y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2
h : ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2
hxy₁ : 0 ≤ ‖x + y‖
hxy₂ : 0 ≤ ‖x‖ + ‖y‖
⊢ inner x y = ‖x‖ * ‖y‖

tactic: linarith
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h✝ : ‖x + y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2
h : ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2
hxy₁ : 0 ≤ ‖x + y‖
hxy₂ : 0 ≤ ‖x‖ + ‖y‖
⊢ inner x y = ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2

tactic: ring
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
hx : x ≠ 0
hy : y ≠ 0
h✝ : ‖x + y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2
h : ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2
hxy₁ : 0 ≤ ‖x + y‖
hxy₂ : 0 ≤ ‖x‖ + ‖y‖
⊢ ((‖x‖ + ‖y‖) ^ 2 - ‖x‖ ^ 2 - ‖y‖ ^ 2) / 2 = ‖x‖ * ‖y‖
Theorem: AffineMap.homothety_mul_apply
File: Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean

tactic: simp only [homothety_apply, mul_smul, vadd_vsub]
state_before: R : Type ?u.809738
k : Type u_3
V1 : Type u_2
P1 : Type u_1
V2 : Type ?u.809750
inst✝⁵ : CommRing k
inst✝⁴ : AddCommGroup V1
inst✝³ : AffineSpace V1 P1
inst✝² : AddCommGroup V2
inst✝¹ : Module k V1
inst✝ : Module k V2
c : P1
r₁ r₂ : k
p : P1
⊢ ↑(homothety c (r₁ * r₂)) p = ↑(homothety c r₁) (↑(homothety c r₂) p)
Theorem: Set.exists_injOn_iff_injective
File: Mathlib/Data/Set/Function.lean

tactic: lift f to α → β using trivial
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.34812
ι : Sort ?u.34815
π : α → Type ?u.34820
s s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f✝ f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
inst✝ : Nonempty β
x✝ : ∃ f, Injective f
f : ↑s → β
hf : Injective f
⊢ ∃ f, InjOn f s

tactic: exact ⟨f, injOn_iff_injective.2 hf⟩
state_before: case intro
α : Type u_2
β : Type u_1
γ : Type ?u.34812
ι : Sort ?u.34815
π : α → Type ?u.34820
s s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f✝ f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
inst✝ : Nonempty β
x✝ : ∃ f, Injective f
f : α → β
hf : Injective fun i => f ↑i
⊢ ∃ f, InjOn f s
Theorem: List.tails_eq_inits
File: Mathlib/Data/List/Infix.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.46111
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
⊢ tails [] = reverse (map reverse (inits (reverse [])))

tactic: simp [tails_eq_inits l, append_left_inj]
state_before: α : Type u_1
β : Type ?u.46111
l✝ l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
a : α
l : List α
⊢ tails (a :: l) = reverse (map reverse (inits (reverse (a :: l))))
Theorem: Finsupp.subset_support_tsub
File: Mathlib/Data/Finsupp/Order.lean

tactic: simp (config := { contextual := true }) [subset_iff]
state_before: ι : Type u_1
α : Type u_2
inst✝³ : CanonicallyOrderedAddMonoid α
inst✝² : Sub α
inst✝¹ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
inst✝ : DecidableEq ι
f1 f2 : ι →₀ α
⊢ f1.support \ f2.support ⊆ (f1 - f2).support
Theorem: MeasureTheory.Memℒp.integrable_norm_rpow
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: rw [← memℒp_one_iff_integrable]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.834524
δ : Type ?u.834527
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : α → β
p : ℝ≥0∞
hf : Memℒp f p
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
⊢ Integrable fun x => ‖f x‖ ^ ENNReal.toReal p

tactic: exact hf.norm_rpow hp_ne_zero hp_ne_top
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.834524
δ : Type ?u.834527
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : α → β
p : ℝ≥0∞
hf : Memℒp f p
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
⊢ Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal p) 1
Theorem: ZMod.card_units_eq_totient
File: Mathlib/Data/Nat/Totient.lean

tactic: obtain ⟨m, rfl⟩ : ∃ m, n = m + 1 := exists_eq_succ_of_ne_zero NeZero.out
state_before: n : ℕ
inst✝¹ : NeZero n
inst✝ : Fintype (ZMod n)ˣ
⊢ Fintype.card { x // coprime (ZMod.val x) n } = φ n

tactic: simp only [totient, Finset.card_eq_sum_ones, Fintype.card_subtype, Finset.sum_filter, ←
  Fin.sum_univ_eq_sum_range, @Nat.coprime_comm (m + 1)]
state_before: case intro
m : ℕ
inst✝¹ : NeZero (m + 1)
inst✝ : Fintype (ZMod (m + 1))ˣ
⊢ Fintype.card { x // coprime (ZMod.val x) (m + 1) } = φ (m + 1)

tactic: rfl
state_before: case intro
m : ℕ
inst✝¹ : NeZero (m + 1)
inst✝ : Fintype (ZMod (m + 1))ˣ
⊢ (∑ a : ZMod (m + 1), if coprime (ZMod.val a) (m + 1) then 1 else 0) =
    ∑ i : Fin (m + 1), if coprime (↑i) (m + 1) then 1 else 0
Theorem: Real.arcsin_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: simp [le_antisymm_iff]
state_before: x : ℝ
⊢ arcsin x = 0 ↔ x = 0
Theorem: Equiv.setValue_eq
File: Mathlib/Logic/Equiv/Basic.lean

tactic: simp [setValue, swap_apply_left]
state_before: α : Sort u_2
inst✝ : DecidableEq α
β : Sort u_1
f : α ≃ β
a : α
b : β
⊢ ↑(setValue f a b) a = b
Theorem: Std.PairingHeapImp.Heap.size_combine
File: Std/Data/PairingHeap.lean

tactic: unfold combine
state_before: α : Type u_1
le : α → α → Bool
s : Heap α
⊢ size (combine le s) = size s

tactic: split
state_before: α : Type u_1
le : α → α → Bool
s : Heap α
⊢ size
      (match s with
      | h₁@h_1:(node a child h₂@h:(node a_1 child_1 s)) => merge le (merge le h₁ h₂) (combine le s)
      | h => h) =
    size s

tactic: rename_i a₁ c₁ a₂ c₂ s
state_before: case h_1
α : Type u_1
le : α → α → Bool
x✝ : Heap α
a✝¹ : α
child✝¹ : Heap α
a✝ : α
child✝ s✝ : Heap α
⊢ size (merge le (merge le (node a✝¹ child✝¹ (node a✝ child✝ s✝)) (node a✝ child✝ s✝)) (combine le s✝)) =
    size (node a✝¹ child✝¹ (node a✝ child✝ s✝))

tactic: rw [size_merge le (noSibling_merge _ _ _) (noSibling_combine _ _),
  size_merge_node, size_combine le s]
state_before: case h_1
α : Type u_1
le : α → α → Bool
x✝ : Heap α
a₁ : α
c₁ : Heap α
a₂ : α
c₂ s : Heap α
⊢ size (merge le (merge le (node a₁ c₁ (node a₂ c₂ s)) (node a₂ c₂ s)) (combine le s)) =
    size (node a₁ c₁ (node a₂ c₂ s))

tactic: simp_arith [size]
state_before: case h_1
α : Type u_1
le : α → α → Bool
x✝ : Heap α
a₁ : α
c₁ : Heap α
a₂ : α
c₂ s : Heap α
⊢ size c₁ + size c₂ + 2 + size s = size (node a₁ c₁ (node a₂ c₂ s))

tactic: rfl
state_before: case h_2
α : Type u_1
le : α → α → Bool
s x✝¹ : Heap α
x✝ : ∀ (a : α) (child : Heap α) (a_1 : α) (child_1 s_1 : Heap α), s = node a child (node a_1 child_1 s_1) → False
⊢ size s = size s
Theorem: div_pos
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [div_eq_mul_inv]
state_before: ι : Type ?u.9146
α : Type u_1
β : Type ?u.9152
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
hb : 0 < b
⊢ 0 < a / b

tactic: exact mul_pos ha (inv_pos.2 hb)
state_before: ι : Type ?u.9146
α : Type u_1
β : Type ?u.9152
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
hb : 0 < b
⊢ 0 < a * b⁻¹