tasksource/leandojo huggingface dataset:
Theorem: ChartedSpace.secondCountable_of_sigma_compact
File: Mathlib/Geometry/Manifold/ChartedSpace.lean

tactic: obtain ⟨s, hsc, hsU⟩ : ∃ s, Set.Countable s ∧ (⋃ (x) (_ : x ∈ s), (chartAt H x).source) = univ :=
  countable_cover_nhds_of_sigma_compact fun x : M ↦ chart_source_mem_nhds H x
state_before: H : Type u
H' : Type ?u.44403
M : Type u_1
M' : Type ?u.44409
M'' : Type ?u.44412
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
inst✝¹ : SecondCountableTopology H
inst✝ : SigmaCompactSpace M
⊢ SecondCountableTopology M

tactic: exact ChartedSpace.secondCountable_of_countable_cover H hsU hsc
state_before: case intro.intro
H : Type u
H' : Type ?u.44403
M : Type u_1
M' : Type ?u.44409
M'' : Type ?u.44412
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
inst✝¹ : SecondCountableTopology H
inst✝ : SigmaCompactSpace M
s : Set M
hsc : Set.Countable s
hsU : (⋃ (x : M) (_ : x ∈ s), (chartAt H x).toLocalEquiv.source) = univ
⊢ SecondCountableTopology M
Theorem: Real.summable_nat_pow_inv
File: Mathlib/Analysis/PSeries.lean

tactic: simp only [← rpow_nat_cast, Real.summable_nat_rpow_inv, Nat.one_lt_cast]
state_before: p : ℕ
⊢ (Summable fun n => (↑n ^ ↑p)⁻¹) ↔ 1 < p
Theorem: MonovaryOn.sum_smul_sum_le_card_smul_sum
File: Mathlib/Algebra/Order/Chebyshev.lean

tactic: classical
  obtain ⟨σ, hσ, hs⟩ := s.countable_toSet.exists_cycleOn
  rw [← card_range s.card, sum_smul_sum_eq_sum_perm hσ]
  exact
    sum_le_card_nsmul _ _ _ fun n _ =>
      hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| IsFixedPt.perm_pow h _
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
s : Finset ι
σ : Perm ι
f : ι → α
g : ι → β
hfg : MonovaryOn f g ↑s
⊢ (∑ i in s, f i) • ∑ i in s, g i ≤ card s • ∑ i in s, f i • g i

tactic: obtain ⟨σ, hσ, hs⟩ := s.countable_toSet.exists_cycleOn
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
s : Finset ι
σ : Perm ι
f : ι → α
g : ι → β
hfg : MonovaryOn f g ↑s
⊢ (∑ i in s, f i) • ∑ i in s, g i ≤ card s • ∑ i in s, f i • g i

tactic: rw [← card_range s.card, sum_smul_sum_eq_sum_perm hσ]
state_before: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
s : Finset ι
σ✝ : Perm ι
f : ι → α
g : ι → β
hfg : MonovaryOn f g ↑s
σ : Perm ι
hσ : IsCycleOn σ ↑s
hs : {x | ↑σ x ≠ x} ⊆ ↑s
⊢ (∑ i in s, f i) • ∑ i in s, g i ≤ card s • ∑ i in s, f i • g i

tactic: exact
  sum_le_card_nsmul _ _ _ fun n _ =>
    hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| IsFixedPt.perm_pow h _
state_before: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
s : Finset ι
σ✝ : Perm ι
f : ι → α
g : ι → β
hfg : MonovaryOn f g ↑s
σ : Perm ι
hσ : IsCycleOn σ ↑s
hs : {x | ↑σ x ≠ x} ⊆ ↑s
⊢ ∑ k in range (card s), ∑ i in s, f i • g (↑(σ ^ k) i) ≤ card (range (card s)) • ∑ i in s, f i • g i
Theorem: Finset.update_piecewise
File: Mathlib/Data/Finset/Basic.lean

tactic: ext j
state_before: α : Type u_1
β : Type ?u.305556
γ : Type ?u.305559
δ : α → Sort u_2
s : Finset α
f g : (i : α) → δ i
inst✝¹ : (j : α) → Decidable (j ∈ s)
inst✝ : DecidableEq α
i : α
v : δ i
⊢ update (piecewise s f g) i v = piecewise s (update f i v) (update g i v)

tactic: rcases em (j = i) with (rfl | hj) <;> by_cases hs : j ∈ s <;> simp [*]
state_before: case h
α : Type u_1
β : Type ?u.305556
γ : Type ?u.305559
δ : α → Sort u_2
s : Finset α
f g : (i : α) → δ i
inst✝¹ : (j : α) → Decidable (j ∈ s)
inst✝ : DecidableEq α
i : α
v : δ i
j : α
⊢ update (piecewise s f g) i v j = piecewise s (update f i v) (update g i v) j
Theorem: Rat.inv_coe_int_den_of_pos
File: Mathlib/Data/Rat/Lemmas.lean

tactic: rw [← ofInt_eq_cast, ofInt, mk_eq_divInt, Rat.inv_def', divInt_eq_div, Nat.cast_one]
state_before: a : ℤ
ha0 : 0 < a
⊢ ↑(↑a)⁻¹.den = a

tactic: apply den_div_eq_of_coprime ha0
state_before: a : ℤ
ha0 : 0 < a
⊢ ↑(↑1 / ↑a).den = a

tactic: rw [Int.natAbs_one]
state_before: a : ℤ
ha0 : 0 < a
⊢ Nat.coprime (Int.natAbs 1) (Int.natAbs a)

tactic: exact Nat.coprime_one_left _
state_before: a : ℤ
ha0 : 0 < a
⊢ Nat.coprime 1 (Int.natAbs a)
Theorem: Dense.exists_countable_dense_subset_bot_top
File: Mathlib/Topology/Bases.lean

tactic: rcases hs.exists_countable_dense_subset with ⟨t, hts, htc, htd⟩
state_before: α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : PartialOrder α
s : Set α
inst✝ : SeparableSpace ↑s
hs : Dense s
⊢ ∃ t, t ⊆ s ∧ Set.Countable t ∧ Dense t ∧ (∀ (x : α), IsBot x → x ∈ s → x ∈ t) ∧ ∀ (x : α), IsTop x → x ∈ s → x ∈ t

tactic: refine' ⟨(t ∪ ({ x | IsBot x } ∪ { x | IsTop x })) ∩ s, _, _, _, _, _⟩
state_before: case intro.intro.intro
α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : PartialOrder α
s : Set α
inst✝ : SeparableSpace ↑s
hs : Dense s
t : Set α
hts : t ⊆ s
htc : Set.Countable t
htd : Dense t
⊢ ∃ t, t ⊆ s ∧ Set.Countable t ∧ Dense t ∧ (∀ (x : α), IsBot x → x ∈ s → x ∈ t) ∧ ∀ (x : α), IsTop x → x ∈ s → x ∈ t

tactic: exacts [inter_subset_right _ _,
  (htc.union ((countable_isBot α).union (countable_isTop α))).mono (inter_subset_left _ _),
  htd.mono (subset_inter (subset_union_left _ _) hts), fun x hx hxs => ⟨Or.inr <| Or.inl hx, hxs⟩,
  fun x hx hxs => ⟨Or.inr <| Or.inr hx, hxs⟩]
state_before: case intro.intro.intro.refine'_1
α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : PartialOrder α
s : Set α
inst✝ : SeparableSpace ↑s
hs : Dense s
t : Set α
hts : t ⊆ s
htc : Set.Countable t
htd : Dense t
⊢ (t ∪ ({x | IsBot x} ∪ {x | IsTop x})) ∩ s ⊆ s

case intro.intro.intro.refine'_2
α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : PartialOrder α
s : Set α
inst✝ : SeparableSpace ↑s
hs : Dense s
t : Set α
hts : t ⊆ s
htc : Set.Countable t
htd : Dense t
⊢ Set.Countable ((t ∪ ({x | IsBot x} ∪ {x | IsTop x})) ∩ s)

case intro.intro.intro.refine'_3
α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : PartialOrder α
s : Set α
inst✝ : SeparableSpace ↑s
hs : Dense s
t : Set α
hts : t ⊆ s
htc : Set.Countable t
htd : Dense t
⊢ Dense ((t ∪ ({x | IsBot x} ∪ {x | IsTop x})) ∩ s)

case intro.intro.intro.refine'_4
α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : PartialOrder α
s : Set α
inst✝ : SeparableSpace ↑s
hs : Dense s
t : Set α
hts : t ⊆ s
htc : Set.Countable t
htd : Dense t
⊢ ∀ (x : α), IsBot x → x ∈ s → x ∈ (t ∪ ({x | IsBot x} ∪ {x | IsTop x})) ∩ s

case intro.intro.intro.refine'_5
α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : PartialOrder α
s : Set α
inst✝ : SeparableSpace ↑s
hs : Dense s
t : Set α
hts : t ⊆ s
htc : Set.Countable t
htd : Dense t
⊢ ∀ (x : α), IsTop x → x ∈ s → x ∈ (t ∪ ({x | IsBot x} ∪ {x | IsTop x})) ∩ s
Theorem: Zspan.fract_eq_self
File: Mathlib/Algebra/Module/Zlattice.lean

tactic: classical simp only [Basis.ext_elem_iff b, repr_fract_apply, Int.fract_eq_self,
  mem_fundamentalDomain, Set.mem_Ico]
state_before: E : Type u_1
ι : Type u_2
K : Type u_3
inst✝⁴ : NormedLinearOrderedField K
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace K E
b : Basis ι K E
inst✝¹ : FloorRing K
inst✝ : Fintype ι
x : E
⊢ fract b x = x ↔ x ∈ fundamentalDomain b

tactic: simp only [Basis.ext_elem_iff b, repr_fract_apply, Int.fract_eq_self,
mem_fundamentalDomain, Set.mem_Ico]
state_before: E : Type u_1
ι : Type u_2
K : Type u_3
inst✝⁴ : NormedLinearOrderedField K
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace K E
b : Basis ι K E
inst✝¹ : FloorRing K
inst✝ : Fintype ι
x : E
⊢ fract b x = x ↔ x ∈ fundamentalDomain b
Theorem: eq_one_of_mul_left
File: Mathlib/Algebra/Group/Units.lean

tactic: rwa [mul_comm]
state_before: α : Type u
inst✝¹ : CommMonoid α
inst✝ : Subsingleton αˣ
a b : α
h : a * b = 1
⊢ b * a = 1
Theorem: Equiv.Perm.nthLe_toList
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: simp [toList]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x : α
n : ℕ
hn : n < length (toList p x)
⊢ nthLe (toList p x) n hn = ↑(p ^ n) x
Theorem: Algebra.ringChar_eq
File: Mathlib/Algebra/CharP/Algebra.lean

tactic: rw [ringChar.eq_iff, Algebra.charP_iff K L]
state_before: K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : CommSemiring L
inst✝¹ : Nontrivial L
inst✝ : Algebra K L
⊢ ringChar K = ringChar L

tactic: apply ringChar.charP
state_before: K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : CommSemiring L
inst✝¹ : Nontrivial L
inst✝ : Algebra K L
⊢ CharP L (ringChar L)
Theorem: Subgroup.le_prod_iff
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: simpa only [← Subgroup.toSubmonoid_le] using Submonoid.le_prod_iff
state_before: G : Type u_1
G' : Type ?u.303912
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.303921
inst✝² : AddGroup A
H✝ K✝ : Subgroup G
k : Set G
N : Type u_2
inst✝¹ : Group N
P : Type ?u.303948
inst✝ : Group P
H : Subgroup G
K : Subgroup N
J : Subgroup (G × N)
⊢ J ≤ prod H K ↔ map (MonoidHom.fst G N) J ≤ H ∧ map (MonoidHom.snd G N) J ≤ K
Theorem: Multiset.inter_replicate
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [inter_comm, replicate_inter, min_comm]
state_before: α : Type u_1
β : Type ?u.423349
γ : Type ?u.423352
inst✝ : DecidableEq α
s : Multiset α
n : ℕ
x : α
⊢ s ∩ replicate n x = replicate (min (count x s) n) x
Theorem: SupHom.cancel_left
File: Mathlib/Order/Hom/Lattice.lean

tactic: rw [← SupHom.comp_apply, h, SupHom.comp_apply]
state_before: F : Type ?u.55900
ι : Type ?u.55903
α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.55915
inst✝³ : Sup α
inst✝² : Sup β
inst✝¹ : Sup γ
inst✝ : Sup δ
g : SupHom β γ
f₁ f₂ : SupHom α β
hg : Injective ↑g
h : comp g f₁ = comp g f₂
a : α
⊢ ↑g (↑f₁ a) = ↑g (↑f₂ a)
Theorem: ProjectiveSpectrum.basicOpen_zero
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

tactic: simp
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
⊢ ↑(basicOpen 𝒜 0) = ↑⊥
Theorem: Int.tendsto_coe_cofinite
File: Mathlib/Topology/Instances/Real.lean

tactic: refine' tendsto_cocompact_of_tendsto_dist_comp_atTop (0 : ℝ) _
state_before: α : Type u
β : Type v
γ : Type w
⊢ Tendsto Int.cast cofinite (cocompact ℝ)

tactic: simp only [Filter.tendsto_atTop, eventually_cofinite, not_le, ← mem_ball]
state_before: α : Type u
β : Type v
γ : Type w
⊢ Tendsto (fun y => dist (↑y) 0) cofinite atTop

tactic: change ∀ r : ℝ, (Int.cast ⁻¹' ball (0 : ℝ) r).Finite
state_before: α : Type u
β : Type v
γ : Type w
⊢ ∀ (b : ℝ), Set.Finite {x | ↑x ∈ ball 0 b}

tactic: simp [Real.ball_eq_Ioo, Set.finite_Ioo]
state_before: α : Type u
β : Type v
γ : Type w
⊢ ∀ (r : ℝ), Set.Finite (Int.cast ⁻¹' ball 0 r)
Theorem: Equiv.Perm.sumCongrHom_injective
File: Mathlib/GroupTheory/Perm/Basic.lean

tactic: rintro ⟨⟩ ⟨⟩ h
state_before: α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
⊢ Function.Injective ↑(sumCongrHom α β)

tactic: rw [Prod.mk.inj_iff]
state_before: case mk.mk
α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
fst✝¹ : Perm α
snd✝¹ : Perm β
fst✝ : Perm α
snd✝ : Perm β
h : ↑(sumCongrHom α β) (fst✝¹, snd✝¹) = ↑(sumCongrHom α β) (fst✝, snd✝)
⊢ (fst✝¹, snd✝¹) = (fst✝, snd✝)

tactic: constructor <;> ext i
state_before: case mk.mk
α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
fst✝¹ : Perm α
snd✝¹ : Perm β
fst✝ : Perm α
snd✝ : Perm β
h : ↑(sumCongrHom α β) (fst✝¹, snd✝¹) = ↑(sumCongrHom α β) (fst✝, snd✝)
⊢ fst✝¹ = fst✝ ∧ snd✝¹ = snd✝

tactic: simpa using Equiv.congr_fun h (Sum.inl i)
state_before: case mk.mk.left.H
α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
fst✝¹ : Perm α
snd✝¹ : Perm β
fst✝ : Perm α
snd✝ : Perm β
h : ↑(sumCongrHom α β) (fst✝¹, snd✝¹) = ↑(sumCongrHom α β) (fst✝, snd✝)
i : α
⊢ ↑fst✝¹ i = ↑fst✝ i

tactic: simpa using Equiv.congr_fun h (Sum.inr i)
state_before: case mk.mk.right.H
α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
fst✝¹ : Perm α
snd✝¹ : Perm β
fst✝ : Perm α
snd✝ : Perm β
h : ↑(sumCongrHom α β) (fst✝¹, snd✝¹) = ↑(sumCongrHom α β) (fst✝, snd✝)
i : β
⊢ ↑snd✝¹ i = ↑snd✝ i
Theorem: Units.mk0_inj
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: injection h
state_before: α : Type ?u.13598
M₀ : Type ?u.13601
G₀ : Type u_1
M₀' : Type ?u.13607
G₀' : Type ?u.13610
F : Type ?u.13613
F' : Type ?u.13616
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a✝ b✝ a b : G₀
ha : a ≠ 0
hb : b ≠ 0
h : mk0 a ha = mk0 b hb
⊢ a = b
Theorem: iUnion_Ico_zsmul
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simpa only [zero_add] using iUnion_Ico_add_zsmul hp 0
state_before: α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
p : α
hp : 0 < p
a : α
⊢ (⋃ (n : ℤ), Ico (n • p) ((n + 1) • p)) = univ
Theorem: Computation.map_congr
File: Mathlib/Data/Seq/Computation.lean

tactic: rw [← lift_eq_iff_equiv]
state_before: α : Type u
β : Type v
γ : Type w
s1 s2 : Computation α
f : α → β
h1 : s1 ~ s2
⊢ map f s1 ~ map f s2

tactic: exact liftRel_map Eq _ ((lift_eq_iff_equiv _ _).2 h1) fun {a} b => congr_arg _
state_before: α : Type u
β : Type v
γ : Type w
s1 s2 : Computation α
f : α → β
h1 : s1 ~ s2
⊢ LiftRel (fun x x_1 => x = x_1) (map f s1) (map f s2)
Theorem: Set.image_star
File: Mathlib/Algebra/Star/Pointwise.lean

tactic: simp only [← star_preimage]
state_before: α : Type u_1
s t : Set α
a : α
inst✝ : InvolutiveStar α
⊢ star '' s = s⋆

tactic: rw [image_eq_preimage_of_inverse] <;> intro <;> simp only [star_star]
state_before: α : Type u_1
s t : Set α
a : α
inst✝ : InvolutiveStar α
⊢ star '' s = star ⁻¹' s
Theorem: Seminorm.closedBall_finset_sup_eq_iInter
File: Mathlib/Analysis/Seminorm.lean

tactic: lift r to NNReal using hr
state_before: R : Type ?u.1084542
R' : Type ?u.1084545
𝕜 : Type u_1
𝕜₂ : Type ?u.1084551
𝕜₃ : Type ?u.1084554
𝕝 : Type ?u.1084557
E : Type u_2
E₂ : Type ?u.1084563
E₃ : Type ?u.1084566
F : Type ?u.1084569
G : Type ?u.1084572
ι : Type u_3
inst✝⁶ : SeminormedRing 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : SeminormedRing 𝕜₂
inst✝² : AddCommGroup E₂
inst✝¹ : Module 𝕜₂ E₂
σ₁₂ : 𝕜 →+* 𝕜₂
inst✝ : RingHomIsometric σ₁₂
p✝ : Seminorm 𝕜 E
p : ι → Seminorm 𝕜 E
s : Finset ι
x : E
r : ℝ
hr : 0 ≤ r
⊢ closedBall (Finset.sup s p) x r = ⋂ (i : ι) (_ : i ∈ s), closedBall (p i) x r

tactic: simp_rw [closedBall, iInter_setOf, finset_sup_apply, NNReal.coe_le_coe, Finset.sup_le_iff, ←
  NNReal.coe_le_coe, coe_mk]
state_before: case intro
R : Type ?u.1084542
R' : Type ?u.1084545
𝕜 : Type u_1
𝕜₂ : Type ?u.1084551
𝕜₃ : Type ?u.1084554
𝕝 : Type ?u.1084557
E : Type u_2
E₂ : Type ?u.1084563
E₃ : Type ?u.1084566
F : Type ?u.1084569
G : Type ?u.1084572
ι : Type u_3
inst✝⁶ : SeminormedRing 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : SeminormedRing 𝕜₂
inst✝² : AddCommGroup E₂
inst✝¹ : Module 𝕜₂ E₂
σ₁₂ : 𝕜 →+* 𝕜₂
inst✝ : RingHomIsometric σ₁₂
p✝ : Seminorm 𝕜 E
p : ι → Seminorm 𝕜 E
s : Finset ι
x : E
r : ℝ≥0
⊢ closedBall (Finset.sup s p) x ↑r = ⋂ (i : ι) (_ : i ∈ s), closedBall (p i) x ↑r
Theorem: Fin.insertNth_binop
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: simp
state_before: m n : ℕ
α : Fin (n + 1) → Type u
β : Type v
op : (j : Fin (n + 1)) → α j → α j → α j
i : Fin (n + 1)
x y : α i
p q : (j : Fin n) → α (↑(succAbove i) j)
⊢ op i (insertNth i x p i) (insertNth i y q i) = op i x y ∧
    (fun j => op (↑(succAbove i) j) (p j) (q j)) = fun j =>
      op (↑(succAbove i) j) (insertNth i x p (↑(succAbove i) j)) (insertNth i y q (↑(succAbove i) j))
Theorem: EuclideanGeometry.orthogonalProjection_vadd_eq_self
File: Mathlib/Geometry/Euclidean/Basic.lean

tactic: have h := vsub_orthogonalProjection_mem_direction_orthogonal s (v +ᵥ p)
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
hp : p ∈ s
v : V
hv : v ∈ (direction s)ᗮ
⊢ ↑(orthogonalProjection s) (v +ᵥ p) = { val := p, property := hp }

tactic: rw [vadd_vsub_assoc, Submodule.add_mem_iff_right _ hv] at h
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
hp : p ∈ s
v : V
hv : v ∈ (direction s)ᗮ
h : v +ᵥ p -ᵥ ↑(↑(orthogonalProjection s) (v +ᵥ p)) ∈ (direction s)ᗮ
⊢ ↑(orthogonalProjection s) (v +ᵥ p) = { val := p, property := hp }

tactic: refine' (eq_of_vsub_eq_zero _).symm
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
hp : p ∈ s
v : V
hv : v ∈ (direction s)ᗮ
h : p -ᵥ ↑(↑(orthogonalProjection s) (v +ᵥ p)) ∈ (direction s)ᗮ
⊢ ↑(orthogonalProjection s) (v +ᵥ p) = { val := p, property := hp }

tactic: ext
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
hp : p ∈ s
v : V
hv : v ∈ (direction s)ᗮ
h : p -ᵥ ↑(↑(orthogonalProjection s) (v +ᵥ p)) ∈ (direction s)ᗮ
⊢ { val := p, property := hp } -ᵥ ↑(orthogonalProjection s) (v +ᵥ p) = 0

tactic: refine' Submodule.disjoint_def.1 s.direction.orthogonal_disjoint _ _ h
state_before: case a
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
hp : p ∈ s
v : V
hv : v ∈ (direction s)ᗮ
h : p -ᵥ ↑(↑(orthogonalProjection s) (v +ᵥ p)) ∈ (direction s)ᗮ
⊢ ↑({ val := p, property := hp } -ᵥ ↑(orthogonalProjection s) (v +ᵥ p)) = ↑0

tactic: exact (_ : s.direction).2
state_before: case a
V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
hp : p ∈ s
v : V
hv : v ∈ (direction s)ᗮ
h : p -ᵥ ↑(↑(orthogonalProjection s) (v +ᵥ p)) ∈ (direction s)ᗮ
⊢ ↑({ val := p, property := hp } -ᵥ ↑(orthogonalProjection s) (v +ᵥ p)) ∈ direction s
Theorem: CategoryTheory.PreservesImage.factorThruImage_comp_hom
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Images.lean

tactic: simp
state_before: A : Type u₁
B : Type u₂
inst✝⁷ : Category A
inst✝⁶ : Category B
inst✝⁵ : HasEqualizers A
inst✝⁴ : HasImages A
inst✝³ : StrongEpiCategory B
inst✝² : HasImages B
L : A ⥤ B
inst✝¹ : {X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PreservesLimit (cospan f g) L
inst✝ : {X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → PreservesColimit (span f g) L
X Y : A
f : X ⟶ Y
⊢ factorThruImage (L.map f) ≫ (iso L f).hom = L.map (factorThruImage f)
Theorem: Finset.isUnit_iff_singleton
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simp only [isUnit_iff, Group.isUnit, and_true_iff]
state_before: F : Type ?u.613237
α : Type u_1
β : Type ?u.613243
γ : Type ?u.613246
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
f : F
s t : Finset α
a b : α
⊢ IsUnit s ↔ ∃ a, s = {a}
Theorem: Ideal.Quotient.quotient_ring_saturate
File: Mathlib/RingTheory/Ideal/Quotient.lean

tactic: ext x
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
s : Set R
⊢ ↑(mk I) ⁻¹' (↑(mk I) '' s) = ⋃ (x : { x // x ∈ I }), (fun y => ↑x + y) '' s

tactic: simp only [mem_preimage, mem_image, mem_iUnion, Ideal.Quotient.eq]
state_before: case h
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x✝ y : R
I : Ideal R
s : Set R
x : R
⊢ x ∈ ↑(mk I) ⁻¹' (↑(mk I) '' s) ↔ x ∈ ⋃ (x : { x // x ∈ I }), (fun y => ↑x + y) '' s

tactic: exact
  ⟨fun ⟨a, a_in, h⟩ => ⟨⟨_, I.neg_mem h⟩, a, a_in, by simp⟩, fun ⟨⟨i, hi⟩, a, ha, Eq⟩ =>
    ⟨a, ha, by rw [← Eq, sub_add_eq_sub_sub_swap, sub_self, zero_sub]; exact I.neg_mem hi⟩⟩
state_before: case h
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x✝ y : R
I : Ideal R
s : Set R
x : R
⊢ (∃ x_1, x_1 ∈ s ∧ x_1 - x ∈ I) ↔ ∃ i x_1, x_1 ∈ s ∧ ↑i + x_1 = x

tactic: simp
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a✝ b : R
S : Type v
x✝¹ y : R
I : Ideal R
s : Set R
x : R
x✝ : ∃ x_1, x_1 ∈ s ∧ x_1 - x ∈ I
a : R
a_in : a ∈ s
h : a - x ∈ I
⊢ ↑{ val := -(a - x), property := (_ : -(a - x) ∈ I) } + a = x

tactic: rw [← Eq, sub_add_eq_sub_sub_swap, sub_self, zero_sub]
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a✝ b : R
S : Type v
x✝¹ y : R
I : Ideal R
s : Set R
x : R
x✝ : ∃ i x_1, x_1 ∈ s ∧ ↑i + x_1 = x
i : R
hi : i ∈ I
a : R
ha : a ∈ s
Eq : ↑{ val := i, property := hi } + a = x
⊢ a - x ∈ I

tactic: exact I.neg_mem hi
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a✝ b : R
S : Type v
x✝¹ y : R
I : Ideal R
s : Set R
x : R
x✝ : ∃ i x_1, x_1 ∈ s ∧ ↑i + x_1 = x
i : R
hi : i ∈ I
a : R
ha : a ∈ s
Eq : ↑{ val := i, property := hi } + a = x
⊢ -↑{ val := i, property := hi } ∈ I
Theorem: Quiver.Path.cast_cons
File: Mathlib/Combinatorics/Quiver/Cast.lean

tactic: subst_vars
state_before: U : Type u_1
inst✝ : Quiver U
u v w u' w' : U
p : Path u v
e : v ⟶ w
hu : u = u'
hw : w = w'
⊢ cast hu hw (cons p e) = cons (cast hu (_ : v = v) p) (Hom.cast (_ : v = v) hw e)

tactic: rfl
state_before: U : Type u_1
inst✝ : Quiver U
v u' w' : U
p : Path u' v
e : v ⟶ w'
⊢ cast (_ : u' = u') (_ : w' = w') (cons p e) =
    cons (cast (_ : u' = u') (_ : v = v) p) (Hom.cast (_ : v = v) (_ : w' = w') e)
Theorem: Real.Angle.two_nsmul_eq_pi_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: have h : (π : Angle) = (2 : ℕ) • (π / 2 : ℝ) := by rw [two_nsmul, add_halves]
state_before: θ : Angle
⊢ 2 • θ = ↑π ↔ θ = ↑(π / 2) ∨ θ = ↑(-π / 2)

tactic: nth_rw 1 [h]
state_before: θ : Angle
h : ↑π = ↑(2 • (π / 2))
⊢ 2 • θ = ↑π ↔ θ = ↑(π / 2) ∨ θ = ↑(-π / 2)

tactic: rw [coe_nsmul, two_nsmul_eq_iff]
state_before: θ : Angle
h : ↑π = ↑(2 • (π / 2))
⊢ 2 • θ = ↑(2 • (π / 2)) ↔ θ = ↑(π / 2) ∨ θ = ↑(-π / 2)

tactic: convert Iff.rfl
state_before: θ : Angle
h : ↑π = ↑(2 • (π / 2))
⊢ θ = ↑(π / 2) ∨ θ = ↑(π / 2) + ↑π ↔ θ = ↑(π / 2) ∨ θ = ↑(-π / 2)

tactic: rw [add_comm, ← coe_add, ← sub_eq_zero, ← coe_sub, neg_div, ←neg_sub, sub_neg_eq_add, add_assoc,
  add_halves, ← two_mul, coe_neg, coe_two_pi, neg_zero]
state_before: case h.e'_2.h.e'_2.h.e'_3
θ : Angle
h : ↑π = ↑(2 • (π / 2))
⊢ ↑(-π / 2) = ↑(π / 2) + ↑π

tactic: rw [two_nsmul, add_halves]
state_before: θ : Angle
⊢ ↑π = ↑(2 • (π / 2))
Theorem: inner_sub_right
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: simp [sub_eq_add_neg, inner_add_right]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.1770896
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y z : E
⊢ inner x (y - z) = inner x y - inner x z
Theorem: Matrix.trace_mul_cycle'
File: Mathlib/LinearAlgebra/Matrix/Trace.lean

tactic: rw [← Matrix.mul_assoc, trace_mul_comm]
state_before: ι : Type ?u.31878
m : Type u_2
n : Type u_3
p : Type u_4
α : Type ?u.31890
R : Type u_1
S : Type ?u.31896
inst✝³ : Fintype m
inst✝² : Fintype n
inst✝¹ : Fintype p
inst✝ : NonUnitalCommSemiring R
A : Matrix m n R
B : Matrix n p R
C : Matrix p m R
⊢ trace (A ⬝ (B ⬝ C)) = trace (C ⬝ (A ⬝ B))