tasksource/leandojo huggingface dataset:
Theorem: AlgebraicTopology.DoldKan.HigherFacesVanish.comp_σ
File: Mathlib/AlgebraicTopology/DoldKan/Degeneracies.lean

tactic: simp only [hnbq, Nat.lt_add_one_iff, le_add_iff_nonneg_right, zero_le]
state_before: C : Type ?u.24
inst✝¹ : Category C
inst✝ : Preadditive C
Y : C
X : SimplicialObject C
n b q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hnbq : n + 1 = b + q
⊢ b < n + 1 + 1

tactic: rw [assoc, SimplicialObject.δ_comp_σ_of_gt', Fin.pred_succ, v.comp_δ_eq_zero_assoc _ _ hj,
  zero_comp]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
Y : C
X : SimplicialObject C
n b q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hnbq : n + 1 = b + q
j : Fin (n + 1 + 1)
hj : n + 1 + 1 ≤ ↑j + q
⊢ (φ ≫ SimplicialObject.σ X { val := b, isLt := (_ : b < n + 1 + 1) }) ≫ SimplicialObject.δ X (Fin.succ j) = 0

tactic: dsimp
state_before: case H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
Y : C
X : SimplicialObject C
n b q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hnbq : n + 1 = b + q
j : Fin (n + 1 + 1)
hj : n + 1 + 1 ≤ ↑j + q
⊢ Fin.succ { val := b, isLt := (_ : b < n + 1 + 1) } < Fin.succ j

tactic: rw [Fin.lt_iff_val_lt_val, Fin.val_succ]
state_before: case H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
Y : C
X : SimplicialObject C
n b q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hnbq : n + 1 = b + q
j : Fin (n + 1 + 1)
hj : n + 1 + 1 ≤ ↑j + q
⊢ { val := b + 1, isLt := (_ : Nat.succ b < Nat.succ (n + 2)) } < Fin.succ j

tactic: linarith
state_before: case H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
Y : C
X : SimplicialObject C
n b q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hnbq : n + 1 = b + q
j : Fin (n + 1 + 1)
hj : n + 1 + 1 ≤ ↑j + q
⊢ ↑{ val := b + 1, isLt := (_ : Nat.succ b < Nat.succ (n + 2)) } < ↑j + 1

tactic: intro hj'
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
Y : C
X : SimplicialObject C
n b q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hnbq : n + 1 = b + q
j : Fin (n + 1 + 1)
hj : n + 1 + 1 ≤ ↑j + q
⊢ j ≠ 0

tactic: simp only [hnbq, add_comm b, add_assoc, hj', Fin.val_zero, zero_add, add_le_iff_nonpos_right,
  nonpos_iff_eq_zero, add_eq_zero, false_and] at hj
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
Y : C
X : SimplicialObject C
n b q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hnbq : n + 1 = b + q
j : Fin (n + 1 + 1)
hj : n + 1 + 1 ≤ ↑j + q
hj' : j = 0
⊢ False
Theorem: Matrix.IsDiag.isSymm
File: Mathlib/LinearAlgebra/Matrix/IsDiag.lean

tactic: ext (i j)
state_before: α : Type u_1
β : Type ?u.21624
R : Type ?u.21627
n : Type u_2
m : Type ?u.21633
inst✝ : Zero α
A : Matrix n n α
h : IsDiag A
⊢ IsSymm A

tactic: by_cases g : i = j
state_before: case a.h
α : Type u_1
β : Type ?u.21624
R : Type ?u.21627
n : Type u_2
m : Type ?u.21633
inst✝ : Zero α
A : Matrix n n α
h : IsDiag A
i j : n
⊢ Aᵀ i j = A i j

tactic: simp [h g, h (Ne.symm g)]
state_before: case neg
α : Type u_1
β : Type ?u.21624
R : Type ?u.21627
n : Type u_2
m : Type ?u.21633
inst✝ : Zero α
A : Matrix n n α
h : IsDiag A
i j : n
g : ¬i = j
⊢ Aᵀ i j = A i j

tactic: rw [g, transpose_apply]
state_before: case pos
α : Type u_1
β : Type ?u.21624
R : Type ?u.21627
n : Type u_2
m : Type ?u.21633
inst✝ : Zero α
A : Matrix n n α
h : IsDiag A
i j : n
g : i = j
⊢ Aᵀ i j = A i j
Theorem: Finset.noncommProd_lemma
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: simp_rw [Multiset.mem_map]
state_before: F : Type ?u.137488
ι : Type ?u.137491
α : Type u_1
β : Type u_2
γ : Type ?u.137500
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f : α → β
comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
⊢ Set.Pairwise {x | x ∈ Multiset.map f s.val} Commute

tactic: rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ _
state_before: F : Type ?u.137488
ι : Type ?u.137491
α : Type u_1
β : Type u_2
γ : Type ?u.137500
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f : α → β
comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
⊢ Set.Pairwise {x | ∃ a, a ∈ s.val ∧ f a = x} Commute

tactic: exact comm.of_refl ha hb
state_before: case intro.intro.intro.intro
F : Type ?u.137488
ι : Type ?u.137491
α : Type u_1
β : Type u_2
γ : Type ?u.137500
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f : α → β
comm : Set.Pairwise ↑s fun a b => Commute (f a) (f b)
a : α
ha : a ∈ s.val
b : α
hb : b ∈ s.val
a✝ : f a ≠ f b
⊢ Commute (f a) (f b)
Theorem: div_le_iff_le_mul
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [← mul_le_mul_iff_right c, div_eq_mul_inv, inv_mul_cancel_right]
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : α
⊢ a / c ≤ b ↔ a ≤ b * c
Theorem: BoundedContinuousFunction.self_eq_nnrealPart_sub_nnrealPart_neg
File: Mathlib/Topology/ContinuousFunction/Bounded.lean

tactic: funext x
state_before: F : Type ?u.1619749
α : Type u
β : Type v
γ : Type w
inst✝ : TopologicalSpace α
f : α →ᵇ ℝ
⊢ ↑f = toReal ∘ ↑(nnrealPart f) - toReal ∘ ↑(nnrealPart (-f))

tactic: dsimp
state_before: case h
F : Type ?u.1619749
α : Type u
β : Type v
γ : Type w
inst✝ : TopologicalSpace α
f : α →ᵇ ℝ
x : α
⊢ ↑f x = (toReal ∘ ↑(nnrealPart f) - toReal ∘ ↑(nnrealPart (-f))) x

tactic: simp only [max_zero_sub_max_neg_zero_eq_self]
state_before: case h
F : Type ?u.1619749
α : Type u
β : Type v
γ : Type w
inst✝ : TopologicalSpace α
f : α →ᵇ ℝ
x : α
⊢ ↑f x = max (↑f x) 0 - max (-↑f x) 0
Theorem: MeasureTheory.TendstoInMeasure.exists_seq_tendstoInMeasure_atTop
File: Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean

tactic: obtain ⟨ns, h_tendsto_ns⟩ : ∃ ns : ℕ → ι, Tendsto ns atTop u := exists_seq_tendsto u
state_before: α : Type u_2
ι : Type u_1
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝² : MetricSpace E
f✝ : ℕ → α → E
g✝ : α → E
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
f : ι → α → E
g : α → E
hfg : TendstoInMeasure μ f u g
⊢ ∃ ns, TendstoInMeasure μ (fun n => f (ns n)) atTop g

tactic: exact ⟨ns, fun ε hε => (hfg ε hε).comp h_tendsto_ns⟩
state_before: case intro
α : Type u_2
ι : Type u_1
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝² : MetricSpace E
f✝ : ℕ → α → E
g✝ : α → E
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
f : ι → α → E
g : α → E
hfg : TendstoInMeasure μ f u g
ns : ℕ → ι
h_tendsto_ns : Tendsto ns atTop u
⊢ ∃ ns, TendstoInMeasure μ (fun n => f (ns n)) atTop g
Theorem: ModuleCat.isZero_of_subsingleton
File: Mathlib/Algebra/Category/ModuleCat/Basic.lean

tactic: ext x
state_before: R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : M ⟶ X
⊢ f = default

tactic: rw [Subsingleton.elim x (0 : M)]
state_before: case h
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : M ⟶ X
x : ↑M
⊢ ↑f x = ↑default x

tactic: dsimp
state_before: case h
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : M ⟶ X
x : ↑M
⊢ ↑f 0 = ↑default 0

tactic: simp
state_before: case h
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : M ⟶ X
x : ↑M
⊢ ↑f 0 = ↑0 0

tactic: ext x
state_before: R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : X ⟶ M
⊢ f = default

tactic: apply Subsingleton.elim
state_before: case h
R : Type u
inst✝¹ : Ring R
M : ModuleCat R
inst✝ : Subsingleton ↑M
X : ModuleCat R
f : X ⟶ M
x : ↑X
⊢ ↑f x = ↑default x
Theorem: Real.Angle.coe_abs_toReal_of_sign_nonneg
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [abs_eq_self.2 (toReal_nonneg_iff_sign_nonneg.2 h), coe_toReal]
state_before: θ : Angle
h : 0 ≤ sign θ
⊢ ↑(abs (toReal θ)) = θ
Theorem: Set.image_mul_right_Ioo
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [h, division_def]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a b c : α
h : 0 < c
⊢ ↑(Units.mulRight (Units.mk0 c (_ : c ≠ 0))).symm ⁻¹' Ioo a b = Ioo (a * c) (b * c)
Theorem: Pretrivialization.trans_source
File: Mathlib/Topology/FiberBundle/Trivialization.lean

tactic: rw [LocalEquiv.trans_source, LocalEquiv.symm_source, e.target_inter_preimage_symm_source_eq]
state_before: ι : Type ?u.11255
B : Type u_1
F : Type u_2
E : B → Type ?u.11266
Z : Type u_3
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e✝ : Pretrivialization F proj
x : Z
e f : Pretrivialization F proj
⊢ (LocalEquiv.trans (LocalEquiv.symm f.toLocalEquiv) e.toLocalEquiv).source = (e.baseSet ∩ f.baseSet) ×ˢ univ
Theorem: EMetric.exists_ball_subset_ball
File: Mathlib/Topology/MetricSpace/EMetricSpace.lean

tactic: have : 0 < ε - edist y x := by simpa using h
state_before: α : Type u
β : Type v
X : Type ?u.192900
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
⊢ ∃ ε', ε' > 0 ∧ ball y ε' ⊆ ball x ε

tactic: refine' ⟨ε - edist y x, this, ball_subset _ (ne_top_of_lt h)⟩
state_before: α : Type u
β : Type v
X : Type ?u.192900
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
this : 0 < ε - edist y x
⊢ ∃ ε', ε' > 0 ∧ ball y ε' ⊆ ball x ε

tactic: exact (add_tsub_cancel_of_le (mem_ball.mp h).le).le
state_before: α : Type u
β : Type v
X : Type ?u.192900
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
this : 0 < ε - edist y x
⊢ edist y x + (ε - edist y x) ≤ ε

tactic: simpa using h
state_before: α : Type u
β : Type v
X : Type ?u.192900
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
h : y ∈ ball x ε
⊢ 0 < ε - edist y x
Theorem: CategoryTheory.Limits.kernelZeroIsoSource_inv
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: simp
state_before: C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : HasKernel f
⊢ 𝟙 X ≫ 0 = 0

tactic: apply equalizer.hom_ext
state_before: C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : HasKernel f
⊢ kernelZeroIsoSource.inv = kernel.lift 0 (𝟙 X) (_ : 𝟙 X ≫ 0 = 0)

tactic: simp [kernelZeroIsoSource]
state_before: case h
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : HasKernel f
⊢ kernelZeroIsoSource.inv ≫ equalizer.ι 0 0 = kernel.lift 0 (𝟙 X) (_ : 𝟙 X ≫ 0 = 0) ≫ equalizer.ι 0 0
Theorem: IsGroupHom.trivial_ker_iff_eq_one
File: Mathlib/Deprecated/Subgroup.lean

tactic: rw [Set.ext_iff]
state_before: G : Type u_1
H : Type u_2
A : Type ?u.115479
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
⊢ ker f = IsSubgroup.trivial G ↔ ∀ (x : G), f x = 1 → x = 1

tactic: simp [ker]
state_before: G : Type u_1
H : Type u_2
A : Type ?u.115479
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
⊢ (∀ (x : G), x ∈ ker f ↔ x ∈ IsSubgroup.trivial G) ↔ ∀ (x : G), f x = 1 → x = 1

tactic: exact ⟨fun h x hx => (h x).1 hx, fun h x => ⟨h x, fun hx => by rw [hx, hf.map_one]⟩⟩
state_before: G : Type u_1
H : Type u_2
A : Type ?u.115479
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
⊢ (∀ (x : G), f x = 1 ↔ x = 1) ↔ ∀ (x : G), f x = 1 → x = 1

tactic: rw [hx, hf.map_one]
state_before: G : Type u_1
H : Type u_2
A : Type ?u.115479
a a₁ a₂ b c : G
inst✝¹ : Group G
inst✝ : Group H
f : G → H
hf : IsGroupHom f
h : ∀ (x : G), f x = 1 → x = 1
x : G
hx : x = 1
⊢ f x = 1
Theorem: ENNReal.rpow_sub
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: rw [sub_eq_add_neg, rpow_add _ _ hx h'x, rpow_neg, div_eq_mul_inv]
state_before: x : ℝ≥0∞
y z : ℝ
hx : x ≠ 0
h'x : x ≠ ⊤
⊢ x ^ (y - z) = x ^ y / x ^ z
Theorem: BoundedContinuousFunction.norm_eq_iSup_norm
File: Mathlib/Topology/ContinuousFunction/Bounded.lean

tactic: simp_rw [norm_def, dist_eq_iSup, coe_zero, Pi.zero_apply, dist_zero_right]
state_before: F : Type ?u.1017678
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
⊢ ‖f‖ = ⨆ (x : α), ‖↑f x‖
Theorem: Mathlib.Tactic.Ring.coeff_mul
File: Mathlib/Tactic/Ring/Basic.lean

tactic: subst_vars
state_before: u : Lean.Level
R : Type ?u.272248
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a₃ c₂ k a₁ a₂ : ℕ
x✝ : a₃ = c₂ * k
⊢ a₁ ^ a₂ * a₃ = a₁ ^ a₂ * c₂ * k

tactic: rw [mul_assoc]
state_before: u : Lean.Level
R : Type ?u.272248
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
c₂ k a₁ a₂ : ℕ
⊢ a₁ ^ a₂ * (c₂ * k) = a₁ ^ a₂ * c₂ * k
Theorem: MeasureTheory.intervalIntegral_tendsto_integral
File: Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean

tactic: let φ i := Ioc (a i) (b i)
state_before: ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a b : ι → ℝ
f : ℝ → E
hfi : Integrable f
ha : Tendsto a l atBot
hb : Tendsto b l atTop
⊢ Tendsto (fun i => ∫ (x : ℝ) in a i..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ), f x ∂μ))

tactic: have hφ : AECover μ l φ := aecover_Ioc ha hb
state_before: ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a b : ι → ℝ
f : ℝ → E
hfi : Integrable f
ha : Tendsto a l atBot
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Ioc (a i) (b i)
⊢ Tendsto (fun i => ∫ (x : ℝ) in a i..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ), f x ∂μ))

tactic: refine' (hφ.integral_tendsto_of_countably_generated hfi).congr' _
state_before: ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a b : ι → ℝ
f : ℝ → E
hfi : Integrable f
ha : Tendsto a l atBot
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Ioc (a i) (b i)
hφ : AECover μ l φ
⊢ Tendsto (fun i => ∫ (x : ℝ) in a i..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ), f x ∂μ))

tactic: filter_upwards [ha.eventually (eventually_le_atBot 0),
  hb.eventually (eventually_ge_atTop 0)] with i hai hbi
state_before: ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a b : ι → ℝ
f : ℝ → E
hfi : Integrable f
ha : Tendsto a l atBot
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Ioc (a i) (b i)
hφ : AECover μ l φ
⊢ (fun i => ∫ (x : ℝ) in φ i, f x ∂μ) =ᶠ[l] fun i => ∫ (x : ℝ) in a i..b i, f x ∂μ

tactic: exact (intervalIntegral.integral_of_le (hai.trans hbi)).symm
state_before: case h
ι : Type u_2
E : Type u_1
μ : Measure ℝ
l : Filter ι
inst✝³ : IsCountablyGenerated l
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
a b : ι → ℝ
f : ℝ → E
hfi : Integrable f
ha : Tendsto a l atBot
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Ioc (a i) (b i)
hφ : AECover μ l φ
i : ι
hai : a i ≤ 0
hbi : 0 ≤ b i
⊢ (∫ (x : ℝ) in Ioc (a i) (b i), f x ∂μ) = ∫ (x : ℝ) in a i..b i, f x ∂μ
Theorem: EMetric.diam_pos_iff'
File: Mathlib/Topology/MetricSpace/EMetricSpace.lean

tactic: simp only [diam_pos_iff, Set.Nontrivial, exists_prop]
state_before: α : Type u
β : Type v
X : Type ?u.314784
inst✝¹ : PseudoEMetricSpace α
γ : Type w
inst✝ : EMetricSpace γ
s : Set γ
⊢ 0 < diam s ↔ ∃ x, x ∈ s ∧ ∃ y, y ∈ s ∧ x ≠ y
Theorem: Configuration.HasLines.pointCount_le_lineCount
File: Mathlib/Combinatorics/Configuration.lean

tactic: by_cases hf : Infinite { p : P // p ∈ l }
state_before: P : Type u_1
L : Type u_2
inst✝² : Membership P L
inst✝¹ : HasLines P L
p : P
l : L
h : ¬p ∈ l
inst✝ : Finite { l // p ∈ l }
⊢ pointCount P l ≤ lineCount L p

tactic: haveI := fintypeOfNotInfinite hf
state_before: case neg
P : Type u_1
L : Type u_2
inst✝² : Membership P L
inst✝¹ : HasLines P L
p : P
l : L
h : ¬p ∈ l
inst✝ : Finite { l // p ∈ l }
hf : ¬Infinite { p // p ∈ l }
⊢ pointCount P l ≤ lineCount L p

tactic: cases nonempty_fintype { l : L // p ∈ l }
state_before: case neg
P : Type u_1
L : Type u_2
inst✝² : Membership P L
inst✝¹ : HasLines P L
p : P
l : L
h : ¬p ∈ l
inst✝ : Finite { l // p ∈ l }
hf : ¬Infinite { p // p ∈ l }
this : Fintype { p // p ∈ l }
⊢ pointCount P l ≤ lineCount L p

tactic: rw [lineCount, pointCount, Nat.card_eq_fintype_card, Nat.card_eq_fintype_card]
state_before: case neg.intro
P : Type u_1
L : Type u_2
inst✝² : Membership P L
inst✝¹ : HasLines P L
p : P
l : L
h : ¬p ∈ l
inst✝ : Finite { l // p ∈ l }
hf : ¬Infinite { p // p ∈ l }
this : Fintype { p // p ∈ l }
val✝ : Fintype { l // p ∈ l }
⊢ pointCount P l ≤ lineCount L p

tactic: exact (le_of_eq Nat.card_eq_zero_of_infinite).trans (zero_le (lineCount L p))
state_before: case pos
P : Type u_1
L : Type u_2
inst✝² : Membership P L
inst✝¹ : HasLines P L
p : P
l : L
h : ¬p ∈ l
inst✝ : Finite { l // p ∈ l }
hf : Infinite { p // p ∈ l }
⊢ pointCount P l ≤ lineCount L p
Theorem: Metric.closedBall_eq_empty
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [← not_nonempty_iff_eq_empty, nonempty_closedBall, not_le]
state_before: α : Type u
β : Type v
X : Type ?u.34183
ι : Type ?u.34186
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
⊢ closedBall x ε = ∅ ↔ ε < 0
Theorem: Multiset.map_add_left_Ico
File: Mathlib/Data/Multiset/LocallyFinite.lean

tactic: classical rw [Ico, Ico, ← Finset.image_add_left_Ico, Finset.image_val,
    ((Finset.nodup _).map <| add_right_injective c).dedup]
state_before: α : Type u_1
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map ((fun x x_1 => x + x_1) c) (Ico a b) = Ico (c + a) (c + b)

tactic: rw [Ico, Ico, ← Finset.image_add_left_Ico, Finset.image_val,
((Finset.nodup _).map <| add_right_injective c).dedup]
state_before: α : Type u_1
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map ((fun x x_1 => x + x_1) c) (Ico a b) = Ico (c + a) (c + b)
Theorem: LocalRing.isUnit_or_isUnit_of_isUnit_add
File: Mathlib/RingTheory/Ideal/LocalRing.lean

tactic: rcases h with ⟨u, hu⟩
state_before: R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommSemiring R
inst✝ : LocalRing R
a b : R
h : IsUnit (a + b)
⊢ IsUnit a ∨ IsUnit b

tactic: rw [← Units.inv_mul_eq_one, mul_add] at hu
state_before: case intro
R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommSemiring R
inst✝ : LocalRing R
a b : R
u : Rˣ
hu : ↑u = a + b
⊢ IsUnit a ∨ IsUnit b

tactic: apply Or.imp _ _ (isUnit_or_isUnit_of_add_one hu) <;> exact isUnit_of_mul_isUnit_right
state_before: case intro
R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommSemiring R
inst✝ : LocalRing R
a b : R
u : Rˣ
hu : ↑u⁻¹ * a + ↑u⁻¹ * b = 1
⊢ IsUnit a ∨ IsUnit b
Theorem: Nat.dvd_mul
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: constructor
state_before: x m n : ℕ
⊢ x ∣ m * n ↔ ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x

tactic: intro h
state_before: case mp
x m n : ℕ
⊢ x ∣ m * n → ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x

tactic: obtain ⟨⟨⟨y, hy⟩, ⟨z, hz⟩⟩, rfl⟩ := prod_dvd_and_dvd_of_dvd_prod h
state_before: case mp
x m n : ℕ
h : x ∣ m * n
⊢ ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x

tactic: exact ⟨y, z, hy, hz, rfl⟩
state_before: case mp.mk.mk.mk.mk
m n y : ℕ
hy : y ∣ m
z : ℕ
hz : z ∣ n
h :
  ↑({ val := y, property := hy }, { val := z, property := hz }).fst *
      ↑({ val := y, property := hy }, { val := z, property := hz }).snd ∣
    m * n
⊢ ∃ y_1 z_1,
    y_1 ∣ m ∧
      z_1 ∣ n ∧
        y_1 * z_1 =
          ↑({ val := y, property := hy }, { val := z, property := hz }).fst *
            ↑({ val := y, property := hy }, { val := z, property := hz }).snd

tactic: rintro ⟨y, z, hy, hz, rfl⟩
state_before: case mpr
x m n : ℕ
⊢ (∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x) → x ∣ m * n

tactic: exact mul_dvd_mul hy hz
state_before: case mpr.intro.intro.intro.intro
m n y z : ℕ
hy : y ∣ m
hz : z ∣ n
⊢ y * z ∣ m * n
Theorem: Set.iUnion_eq_compl_iInter_compl
File: Mathlib/Data/Set/Lattice.lean

tactic: simp only [compl_iInter, compl_compl]
state_before: α : Type ?u.68971
β : Type u_1
γ : Type ?u.68977
ι : Sort u_2
ι' : Sort ?u.68983
ι₂ : Sort ?u.68986
κ : ι → Sort ?u.68991
κ₁ : ι → Sort ?u.68996
κ₂ : ι → Sort ?u.69001
κ' : ι' → Sort ?u.69006
s : ι → Set β
⊢ (⋃ (i : ι), s i) = (⋂ (i : ι), s iᶜ)ᶜ
Theorem: CategoryTheory.isCoseparator_pi
File: Mathlib/CategoryTheory/Generator.lean

tactic: refine'
  ⟨fun h X Y u v huv => _, fun h =>
    (isCoseparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
state_before: C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasProduct f
⊢ IsCoseparator (∏ f) ↔ IsCoseparating (Set.range f)

tactic: refine' h.def _ _ fun g => limit.hom_ext fun b => _
state_before: case refine'_1
C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasProduct f
h : IsCoseparator (∏ f)
X Y : C
u v : X ⟶ Y
huv : ∀ (G : C), G ∈ Set.range f → ∀ (h : Y ⟶ G), u ≫ h = v ≫ h
⊢ u = v

tactic: simpa using huv (f b.as) (by simp) (g ≫ limit.π (Discrete.functor f) _)
state_before: case refine'_1
C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasProduct f
h : IsCoseparator (∏ f)
X Y : C
u v : X ⟶ Y
huv : ∀ (G : C), G ∈ Set.range f → ∀ (h : Y ⟶ G), u ≫ h = v ≫ h
g : Y ⟶ ∏ f
b : Discrete β
⊢ (u ≫ g) ≫ limit.π (Discrete.functor f) b = (v ≫ g) ≫ limit.π (Discrete.functor f) b

tactic: simp
state_before: C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasProduct f
h : IsCoseparator (∏ f)
X Y : C
u v : X ⟶ Y
huv : ∀ (G : C), G ∈ Set.range f → ∀ (h : Y ⟶ G), u ≫ h = v ≫ h
g : Y ⟶ ∏ f
b : Discrete β
⊢ f b.as ∈ Set.range f

tactic: obtain ⟨b, rfl⟩ := Set.mem_range.1 hZ
state_before: case refine'_2
C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasProduct f
h : IsCoseparating (Set.range f)
X Y : C
u v : X ⟶ Y
huv : ∀ (h : Y ⟶ ∏ f), u ≫ h = v ≫ h
Z : C
hZ : Z ∈ Set.range f
g : Y ⟶ Z
⊢ u ≫ g = v ≫ g

tactic: classical simpa using huv (Pi.lift (Pi.single b g)) =≫ Pi.π f b
state_before: case refine'_2.intro
C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasProduct f
h : IsCoseparating (Set.range f)
X Y : C
u v : X ⟶ Y
huv : ∀ (h : Y ⟶ ∏ f), u ≫ h = v ≫ h
b : β
hZ : f b ∈ Set.range f
g : Y ⟶ f b
⊢ u ≫ g = v ≫ g

tactic: simpa using huv (Pi.lift (Pi.single b g)) =≫ Pi.π f b
state_before: case refine'_2.intro
C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasProduct f
h : IsCoseparating (Set.range f)
X Y : C
u v : X ⟶ Y
huv : ∀ (h : Y ⟶ ∏ f), u ≫ h = v ≫ h
b : β
hZ : f b ∈ Set.range f
g : Y ⟶ f b
⊢ u ≫ g = v ≫ g
Theorem: DirectSum.isInternal_submodule_iff_isCompl
File: Mathlib/Algebra/DirectSum/Module.lean

tactic: have : ∀ k, k = i ∨ k = j := fun k ↦ by simpa using Set.ext_iff.mp h k
state_before: R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
⊢ IsInternal A ↔ IsCompl (A i) (A j)

tactic: rw [isInternal_submodule_iff_independent_and_iSup_eq_top, iSup, ← Set.image_univ, h,
  Set.image_insert_eq, Set.image_singleton, sSup_pair, CompleteLattice.independent_pair hij this]
state_before: R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
this : ∀ (k : ι), k = i ∨ k = j
⊢ IsInternal A ↔ IsCompl (A i) (A j)

tactic: exact ⟨fun ⟨hd, ht⟩ ↦ ⟨hd, codisjoint_iff.mpr ht⟩, fun ⟨hd, ht⟩ ↦ ⟨hd, ht.eq_top⟩⟩
state_before: R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
this : ∀ (k : ι), k = i ∨ k = j
⊢ Disjoint (A i) (A j) ∧ A i ⊔ A j = ⊤ ↔ IsCompl (A i) (A j)

tactic: simpa using Set.ext_iff.mp h k
state_before: R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
k : ι
⊢ k = i ∨ k = j