tasksource/leandojo huggingface dataset:
Theorem: Finsupp.support_erase
File: Mathlib/Data/Finsupp/Defs.lean

tactic: classical
dsimp [erase]
congr; apply Subsingleton.elim
state_before: α : Type u_1
β : Type ?u.162373
γ : Type ?u.162376
ι : Type ?u.162379
M : Type u_2
M' : Type ?u.162385
N : Type ?u.162388
P : Type ?u.162391
G : Type ?u.162394
H : Type ?u.162397
R : Type ?u.162400
S : Type ?u.162403
inst✝¹ : Zero M
inst✝ : DecidableEq α
a : α
f : α →₀ M
⊢ (erase a f).support = Finset.erase f.support a

tactic: dsimp [erase]
state_before: α : Type u_1
β : Type ?u.162373
γ : Type ?u.162376
ι : Type ?u.162379
M : Type u_2
M' : Type ?u.162385
N : Type ?u.162388
P : Type ?u.162391
G : Type ?u.162394
H : Type ?u.162397
R : Type ?u.162400
S : Type ?u.162403
inst✝¹ : Zero M
inst✝ : DecidableEq α
a : α
f : α →₀ M
⊢ (erase a f).support = Finset.erase f.support a

tactic: congr
state_before: α : Type u_1
β : Type ?u.162373
γ : Type ?u.162376
ι : Type ?u.162379
M : Type u_2
M' : Type ?u.162385
N : Type ?u.162388
P : Type ?u.162391
G : Type ?u.162394
H : Type ?u.162397
R : Type ?u.162400
S : Type ?u.162403
inst✝¹ : Zero M
inst✝ : DecidableEq α
a : α
f : α →₀ M
⊢ Finset.erase f.support a = Finset.erase f.support a

tactic: apply Subsingleton.elim
state_before: case h.e_2.h
α : Type u_1
β : Type ?u.162373
γ : Type ?u.162376
ι : Type ?u.162379
M : Type u_2
M' : Type ?u.162385
N : Type ?u.162388
P : Type ?u.162391
G : Type ?u.162394
H : Type ?u.162397
R : Type ?u.162400
S : Type ?u.162403
inst✝¹ : Zero M
inst✝ : DecidableEq α
a : α
f : α →₀ M
⊢ (fun a b => Classical.decEq α a b) = fun a b => inst✝ a b
Theorem: Polynomial.normalize_monic
File: Mathlib/Data/Polynomial/FieldDivision.lean

tactic: simp [h]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
h : Monic p
⊢ ↑normalize p = p
Theorem: Multiset.card_join
File: Mathlib/Data/Multiset/Bind.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.5793
γ : Type ?u.5796
δ : Type ?u.5799
S : Multiset (Multiset α)
⊢ ↑card (join 0) = sum (map (↑card) 0)

tactic: simp
state_before: α : Type u_1
β : Type ?u.5793
γ : Type ?u.5796
δ : Type ?u.5799
S : Multiset (Multiset α)
⊢ ∀ ⦃a : Multiset α⦄ {s : Multiset (Multiset α)},
    ↑card (join s) = sum (map (↑card) s) → ↑card (join (a ::ₘ s)) = sum (map (↑card) (a ::ₘ s))
Theorem: MeasureTheory.integral_map
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: congr 1
state_before: α : Type u_2
E : Type u_3
F : Type ?u.1382470
𝕜 : Type ?u.1382473
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g✝ : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1385164
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : AEMeasurable φ
f : β → E
hfm : AEStronglyMeasurable f (Measure.map φ μ)
g : β → E := AEStronglyMeasurable.mk f hfm
⊢ (∫ (y : β), g y ∂Measure.map φ μ) = ∫ (y : β), g y ∂Measure.map (AEMeasurable.mk φ hφ) μ

tactic: exact Measure.map_congr hφ.ae_eq_mk
state_before: case e_μ
α : Type u_2
E : Type u_3
F : Type ?u.1382470
𝕜 : Type ?u.1382473
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
inst✝⁹ : CompleteSpace E
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : SMulCommClass ℝ 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : CompleteSpace F
f✝ g✝ : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1385164
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
ν : Measure α
β : Type u_1
inst✝ : MeasurableSpace β
φ : α → β
hφ : AEMeasurable φ
f : β → E
hfm : AEStronglyMeasurable f (Measure.map φ μ)
g : β → E := AEStronglyMeasurable.mk f hfm
⊢ Measure.map φ μ = Measure.map (AEMeasurable.mk φ hφ) μ
Theorem: Function.Injective.preimage_surjective
File: Mathlib/Data/Set/Image.lean

tactic: intro s
state_before: ι : Sort ?u.104047
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
⊢ Surjective (preimage f)

tactic: use f '' s
state_before: ι : Sort ?u.104047
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
s : Set α
⊢ ∃ a, f ⁻¹' a = s

tactic: rw [hf.preimage_image]
state_before: ι : Sort ?u.104047
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
s : Set α
⊢ f ⁻¹' (f '' s) = s
Theorem: ZMod.valMinAbs_neg_of_ne_half
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases' eq_zero_or_neZero n with h h
state_before: n : ℕ
a : ZMod n
ha : 2 * val a ≠ n
⊢ valMinAbs (-a) = -valMinAbs a

tactic: refine' (valMinAbs_spec _ _).2 ⟨_, _, _⟩
state_before: case inr
n : ℕ
a : ZMod n
ha : 2 * val a ≠ n
h : NeZero n
⊢ valMinAbs (-a) = -valMinAbs a

tactic: subst h
state_before: case inl
n : ℕ
a : ZMod n
ha : 2 * val a ≠ n
h : n = 0
⊢ valMinAbs (-a) = -valMinAbs a

tactic: rfl
state_before: case inl
a : ZMod 0
ha : 2 * val a ≠ 0
⊢ valMinAbs (-a) = -valMinAbs a

tactic: rw [Int.cast_neg, coe_valMinAbs]
state_before: case inr.refine'_1
n : ℕ
a : ZMod n
ha : 2 * val a ≠ n
h : NeZero n
⊢ -a = ↑(-valMinAbs a)

tactic: rw [neg_mul, neg_lt_neg_iff]
state_before: case inr.refine'_2
n : ℕ
a : ZMod n
ha : 2 * val a ≠ n
h : NeZero n
⊢ -↑n < -valMinAbs a * 2

tactic: exact a.valMinAbs_mem_Ioc.2.lt_of_ne (mt a.valMinAbs_mul_two_eq_iff.1 ha)
state_before: case inr.refine'_2
n : ℕ
a : ZMod n
ha : 2 * val a ≠ n
h : NeZero n
⊢ valMinAbs a * 2 < ↑n

tactic: linarith only [a.valMinAbs_mem_Ioc.1]
state_before: case inr.refine'_3
n : ℕ
a : ZMod n
ha : 2 * val a ≠ n
h : NeZero n
⊢ -valMinAbs a * 2 ≤ ↑n
Theorem: Real.logb_neg_iff
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rw [← logb_one]
state_before: b x y : ℝ
hb : 1 < b
h : 0 < x
⊢ logb b x < 0 ↔ x < 1

tactic: exact logb_lt_logb_iff hb h zero_lt_one
state_before: b x y : ℝ
hb : 1 < b
h : 0 < x
⊢ logb b x < logb ?m.12315 1 ↔ x < 1

b x y : ℝ
hb : 1 < b
h : 0 < x
⊢ ℝ
Theorem: MeasureTheory.Measure.Subtype.volume_univ
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [Subtype.volume_def, comap_apply₀ _ _ _ _ MeasurableSet.univ.nullMeasurableSet]
state_before: α : Type u_1
β : Type ?u.270811
γ : Type ?u.270814
δ : Type ?u.270817
ι : Type ?u.270820
R : Type ?u.270823
R' : Type ?u.270826
s : Set α
inst✝ : MeasureSpace α
p : α → Prop
hs : NullMeasurableSet s
⊢ ↑↑volume univ = ↑↑volume s

tactic: congr
state_before: α : Type u_1
β : Type ?u.270811
γ : Type ?u.270814
δ : Type ?u.270817
ι : Type ?u.270820
R : Type ?u.270823
R' : Type ?u.270826
s : Set α
inst✝ : MeasureSpace α
p : α → Prop
hs : NullMeasurableSet s
⊢ ↑↑volume (Subtype.val '' univ) = ↑↑volume s

tactic: simp only [image_univ, Subtype.range_coe_subtype, setOf_mem_eq]
state_before: case e_a
α : Type u_1
β : Type ?u.270811
γ : Type ?u.270814
δ : Type ?u.270817
ι : Type ?u.270820
R : Type ?u.270823
R' : Type ?u.270826
s : Set α
inst✝ : MeasureSpace α
p : α → Prop
hs : NullMeasurableSet s
⊢ Subtype.val '' univ = s

tactic: exact Subtype.coe_injective
state_before: α : Type u_1
β : Type ?u.270811
γ : Type ?u.270814
δ : Type ?u.270817
ι : Type ?u.270820
R : Type ?u.270823
R' : Type ?u.270826
s : Set α
inst✝ : MeasureSpace α
p : α → Prop
hs : NullMeasurableSet s
⊢ Injective Subtype.val

tactic: exact fun t => MeasurableSet.nullMeasurableSet_subtype_coe hs
state_before: α : Type u_1
β : Type ?u.270811
γ : Type ?u.270814
δ : Type ?u.270817
ι : Type ?u.270820
R : Type ?u.270823
R' : Type ?u.270826
s : Set α
inst✝ : MeasureSpace α
p : α → Prop
hs : NullMeasurableSet s
⊢ ∀ (s_1 : Set ↑s), MeasurableSet s_1 → NullMeasurableSet (Subtype.val '' s_1)
Theorem: Finset.memberSubfamily_memberSubfamily
File: Mathlib/Combinatorics/SetFamily/Compression/Down.lean

tactic: ext
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
⊢ memberSubfamily a (memberSubfamily a 𝒜) = ∅

tactic: simp
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
a✝ : Finset α
⊢ a✝ ∈ memberSubfamily a (memberSubfamily a 𝒜) ↔ a✝ ∈ ∅
Theorem: MeasureTheory.Measure.restrict_congr_mono
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [← restrict_restrict_of_subset hs, h, restrict_restrict_of_subset hs]
state_before: α : Type u_1
β : Type ?u.307608
γ : Type ?u.307611
δ : Type ?u.307614
ι : Type ?u.307617
R : Type ?u.307620
R' : Type ?u.307623
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
hs : s ⊆ t
h : restrict μ t = restrict ν t
⊢ restrict μ s = restrict ν s
Theorem: Int.even_add_one
File: Mathlib/Data/Int/Parity.lean

tactic: simp [even_add]
state_before: m n : ℤ
⊢ Even (n + 1) ↔ ¬Even n
Theorem: Std.RBNode.foldlM_eq_foldlM_toList
File: Std/Data/RBMap/Lemmas.lean

tactic: induction t generalizing init <;> simp [*]
state_before: m : Type u_1 → Type u_2
α : Type u_3
a✝ : Type u_1
f : a✝ → α → m a✝
init : a✝
inst✝¹ : Monad m
inst✝ : LawfulMonad m
t : RBNode α
⊢ foldlM f init t = List.foldlM f init (toList t)
Theorem: div_le_div_iff_right
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: simpa only [div_eq_mul_inv] using mul_le_mul_iff_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 c : α
⊢ a / c ≤ b / c ↔ a ≤ b
Theorem: ZMod.cast_add
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases n
state_before: n : ℕ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ n
a b : ZMod n
⊢ ↑(a + b) = ↑a + ↑b

tactic: symm
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ Nat.succ n✝
a b : ZMod (Nat.succ n✝)
⊢ ↑(a + b) = ↑a + ↑b

tactic: dsimp [ZMod, ZMod.cast]
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ Nat.succ n✝
a b : ZMod (Nat.succ n✝)
⊢ ↑a + ↑b = ↑(a + b)

tactic: erw [← Nat.cast_add, ← sub_eq_zero, ← Nat.cast_sub (Nat.mod_le _ _),
  @CharP.cast_eq_zero_iff R _ m]
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ Nat.succ n✝
a b : ZMod (Nat.succ n✝)
⊢ ↑(val a) + ↑(val b) = ↑(val (a + b))

tactic: exact h.trans (Nat.dvd_sub_mod _)
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ Nat.succ n✝
a b : ZMod (Nat.succ n✝)
⊢ m ∣ val a + val b - (val a + val b) % Nat.succ n✝

tactic: apply Int.cast_add
state_before: case zero
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ Nat.zero
a b : ZMod Nat.zero
⊢ ↑(a + b) = ↑a + ↑b
Theorem: AddMonoidAlgebra.induction_on
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: refine' Finsupp.induction_linear f _ (fun f g hf hg => hadd f g hf hg) fun g r => _
state_before: k : Type u₁
G : Type u₂
R : Type ?u.2138330
inst✝¹ : Semiring k
inst✝ : AddMonoid G
p : AddMonoidAlgebra k G → Prop
f : AddMonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))
hadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)
⊢ p f

tactic: simpa using hsmul 0 (of k G (Multiplicative.ofAdd 0)) (hM 0)
state_before: case refine'_1
k : Type u₁
G : Type u₂
R : Type ?u.2138330
inst✝¹ : Semiring k
inst✝ : AddMonoid G
p : AddMonoidAlgebra k G → Prop
f : AddMonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))
hadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)
⊢ p 0

tactic: convert hsmul r (of k G (Multiplicative.ofAdd g)) (hM g)
state_before: case refine'_2
k : Type u₁
G : Type u₂
R : Type ?u.2138330
inst✝¹ : Semiring k
inst✝ : AddMonoid G
p : AddMonoidAlgebra k G → Prop
f : AddMonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))
hadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)
g : G
r : k
⊢ p (Finsupp.single g r)

tactic: rw [of_apply, toAdd_ofAdd, smul_single', mul_one]
state_before: case h.e'_1
k : Type u₁
G : Type u₂
R : Type ?u.2138330
inst✝¹ : Semiring k
inst✝ : AddMonoid G
p : AddMonoidAlgebra k G → Prop
f : AddMonoidAlgebra k G
hM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))
hadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)
hsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)
g : G
r : k
⊢ Finsupp.single g r = r • ↑(of k G) (↑Multiplicative.ofAdd g)
Theorem: SimpleGraph.edgeDensity_add_edgeDensity_compl
File: Mathlib/Combinatorics/SimpleGraph/Density.lean

tactic: rw [edgeDensity_def, edgeDensity_def, div_add_div_same, div_eq_one_iff_eq]
state_before: 𝕜 : Type ?u.115961
ι : Type ?u.115964
κ : Type ?u.115967
α : Type u_1
β : Type ?u.115973
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
hs : Finset.Nonempty s
ht : Finset.Nonempty t
h : Disjoint s t
⊢ edgeDensity G s t + edgeDensity (Gᶜ) s t = 1

tactic: exact_mod_cast card_interedges_add_card_interedges_compl _ h
state_before: 𝕜 : Type ?u.115961
ι : Type ?u.115964
κ : Type ?u.115967
α : Type u_1
β : Type ?u.115973
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
hs : Finset.Nonempty s
ht : Finset.Nonempty t
h : Disjoint s t
⊢ ↑(card (interedges G s t)) + ↑(card (interedges (Gᶜ) s t)) = ↑(card s) * ↑(card t)

tactic: apply mul_ne_zero <;> exact_mod_cast Nat.pos_iff_ne_zero.1 (Nonempty.card_pos ‹_›)
state_before: 𝕜 : Type ?u.115961
ι : Type ?u.115964
κ : Type ?u.115967
α : Type u_1
β : Type ?u.115973
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
hs : Finset.Nonempty s
ht : Finset.Nonempty t
h : Disjoint s t
⊢ ↑(card s) * ↑(card t) ≠ 0
Theorem: TopologicalSpace.isOpen_iUnion_countable
File: Mathlib/Topology/Bases.lean

tactic: let B := { b ∈ countableBasis α | ∃ i, b ⊆ s i }
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsOpen (s i)
⊢ ∃ T, Set.Countable T ∧ (⋃ (i : ι) (_ : i ∈ T), s i) = ⋃ (i : ι), s i

tactic: choose f hf using fun b : B => b.2.2
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsOpen (s i)
B : Set (Set α) := {b | b ∈ countableBasis α ∧ ∃ i, b ⊆ s i}
⊢ ∃ T, Set.Countable T ∧ (⋃ (i : ι) (_ : i ∈ T), s i) = ⋃ (i : ι), s i

tactic: haveI : Encodable B := ((countable_countableBasis α).mono (sep_subset _ _)).toEncodable
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsOpen (s i)
B : Set (Set α) := {b | b ∈ countableBasis α ∧ ∃ i, b ⊆ s i}
f : ↑B → ι
hf : ∀ (b : ↑B), ↑b ⊆ s (f b)
⊢ ∃ T, Set.Countable T ∧ (⋃ (i : ι) (_ : i ∈ T), s i) = ⋃ (i : ι), s i

tactic: refine' ⟨_, countable_range f, (iUnion₂_subset_iUnion _ _).antisymm (sUnion_subset _)⟩
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsOpen (s i)
B : Set (Set α) := {b | b ∈ countableBasis α ∧ ∃ i, b ⊆ s i}
f : ↑B → ι
hf : ∀ (b : ↑B), ↑b ⊆ s (f b)
this : Encodable ↑B
⊢ ∃ T, Set.Countable T ∧ (⋃ (i : ι) (_ : i ∈ T), s i) = ⋃ (i : ι), s i

tactic: rintro _ ⟨i, rfl⟩ x xs
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsOpen (s i)
B : Set (Set α) := {b | b ∈ countableBasis α ∧ ∃ i, b ⊆ s i}
f : ↑B → ι
hf : ∀ (b : ↑B), ↑b ⊆ s (f b)
this : Encodable ↑B
⊢ ∀ (t' : Set α), (t' ∈ range fun i => s i) → t' ⊆ ⋃ (i : ι) (_ : i ∈ range f), s i

tactic: rcases (isBasis_countableBasis α).exists_subset_of_mem_open xs (H _) with ⟨b, hb, xb, bs⟩
state_before: case intro
α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsOpen (s i)
B : Set (Set α) := {b | b ∈ countableBasis α ∧ ∃ i, b ⊆ s i}
f : ↑B → ι
hf : ∀ (b : ↑B), ↑b ⊆ s (f b)
this : Encodable ↑B
i : ι
x : α
xs : x ∈ (fun i => s i) i
⊢ x ∈ ⋃ (i : ι) (_ : i ∈ range f), s i

tactic: exact ⟨_, ⟨_, rfl⟩, _, ⟨⟨⟨_, hb, _, bs⟩, rfl⟩, rfl⟩, hf _ xb⟩
state_before: case intro.intro.intro.intro
α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsOpen (s i)
B : Set (Set α) := {b | b ∈ countableBasis α ∧ ∃ i, b ⊆ s i}
f : ↑B → ι
hf : ∀ (b : ↑B), ↑b ⊆ s (f b)
this : Encodable ↑B
i : ι
x : α
xs : x ∈ (fun i => s i) i
b : Set α
hb : b ∈ countableBasis α
xb : x ∈ b
bs : b ⊆ (fun i => s i) i
⊢ x ∈ ⋃ (i : ι) (_ : i ∈ range f), s i
Theorem: Real.cos_three_mul
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_inj]
state_before: x y : ℝ
⊢ cos (3 * x) = 4 * cos x ^ 3 - 3 * cos x

tactic: simp [cos_three_mul]
state_before: x y : ℝ
⊢ ↑(cos (3 * x)) = ↑(4 * cos x ^ 3 - 3 * cos x)
Theorem: Submodule.closure_neg
File: Mathlib/Algebra/Module/Submodule/Pointwise.lean

tactic: apply le_antisymm
state_before: α : Type ?u.12121
R : Type u_2
M : Type u_1
inst✝² : Semiring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
s : Set M
⊢ span R (-s) = -span R s

tactic: rw [span_le, coe_set_neg, ← Set.neg_subset, neg_neg]
state_before: case a
α : Type ?u.12121
R : Type u_2
M : Type u_1
inst✝² : Semiring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
s : Set M
⊢ span R (-s) ≤ -span R s

tactic: exact subset_span
state_before: case a
α : Type ?u.12121
R : Type u_2
M : Type u_1
inst✝² : Semiring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
s : Set M
⊢ s ⊆ ↑(span R s)

tactic: rw [neg_le, span_le, coe_set_neg, ← Set.neg_subset]
state_before: case a
α : Type ?u.12121
R : Type u_2
M : Type u_1
inst✝² : Semiring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
s : Set M
⊢ -span R s ≤ span R (-s)

tactic: exact subset_span
state_before: case a
α : Type ?u.12121
R : Type u_2
M : Type u_1
inst✝² : Semiring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
s : Set M
⊢ -s ⊆ ↑(span R (-s))
Theorem: Equiv.Perm.card_support_ne_one
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: by_cases h : f = 1
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g f : Perm α
⊢ card (support f) ≠ 1

tactic: exact ne_of_eq_of_ne (card_support_eq_zero.mpr h) zero_ne_one
state_before: case pos
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g f : Perm α
h : f = 1
⊢ card (support f) ≠ 1

tactic: exact ne_of_gt (one_lt_card_support_of_ne_one h)
state_before: case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g f : Perm α
h : ¬f = 1
⊢ card (support f) ≠ 1
Theorem: Ideal.Quotient.exists_inv
File: Mathlib/RingTheory/Ideal/Quotient.lean

tactic: rintro ⟨a⟩ h
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
hI : IsMaximal I
⊢ ∀ {a : R ⧸ I}, a ≠ 0 → ∃ b, a * b = 1

tactic: rcases hI.exists_inv (mt eq_zero_iff_mem.2 h) with ⟨b, c, hc, abc⟩
state_before: case mk
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a✝¹ b : R
S : Type v
x y : R
I : Ideal R
hI : IsMaximal I
a✝ : R ⧸ I
a : R
h : Quot.mk Setoid.r a ≠ 0
⊢ ∃ b, Quot.mk Setoid.r a * b = 1

tactic: rw [mul_comm] at abc
state_before: case mk.intro.intro.intro
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a✝¹ b✝ : R
S : Type v
x y : R
I : Ideal R
hI : IsMaximal I
a✝ : R ⧸ I
a : R
h : Quot.mk Setoid.r a ≠ 0
b c : R
hc : c ∈ I
abc : b * a + c = 1
⊢ ∃ b, Quot.mk Setoid.r a * b = 1

tactic: refine' ⟨mk _ b, Quot.sound _⟩
state_before: case mk.intro.intro.intro
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a✝¹ b✝ : R
S : Type v
x y : R
I : Ideal R
hI : IsMaximal I
a✝ : R ⧸ I
a : R
h : Quot.mk Setoid.r a ≠ 0
b c : R
hc : c ∈ I
abc : a * b + c = 1
⊢ ∃ b, Quot.mk Setoid.r a * b = 1

tactic: simp only [Submodule.quotientRel_r_def]
state_before: case mk.intro.intro.intro
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a✝¹ b✝ : R
S : Type v
x y : R
I : Ideal R
hI : IsMaximal I
a✝ : R ⧸ I
a : R
h : Quot.mk Setoid.r a ≠ 0
b c : R
hc : c ∈ I
abc : a * b + c = 1
⊢ Setoid.r ((fun x x_1 => x * x_1) a b) 1

tactic: rw [← eq_sub_iff_add_eq'] at abc
state_before: case mk.intro.intro.intro
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a✝¹ b✝ : R
S : Type v
x y : R
I : Ideal R
hI : IsMaximal I
a✝ : R ⧸ I
a : R
h : Quot.mk Setoid.r a ≠ 0
b c : R
hc : c ∈ I
abc : a * b + c = 1
⊢ a * b - 1 ∈ I

tactic: rwa [abc, ← neg_mem_iff (G := R) (H := I), neg_sub] at hc
state_before: case mk.intro.intro.intro
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a✝¹ b✝ : R
S : Type v
x y : R
I : Ideal R
hI : IsMaximal I
a✝ : R ⧸ I
a : R
h : Quot.mk Setoid.r a ≠ 0
b c : R
hc : c ∈ I
abc : c = 1 - a * b
⊢ a * b - 1 ∈ I
Theorem: LinearMap.rTensor_comp_apply
File: Mathlib/LinearAlgebra/TensorProduct.lean

tactic: rw [rTensor_comp, coe_comp]
state_before: R : Type u_1
inst✝¹⁴ : CommSemiring R
R' : Type ?u.1251098
inst✝¹³ : Monoid R'
R'' : Type ?u.1251104
inst✝¹² : Semiring R''
M : Type u_3
N : Type u_2
P : Type u_5
Q : Type u_4
S : Type ?u.1251122
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
x : N ⊗[R] M
⊢ ↑(rTensor M (comp g f)) x = ↑(rTensor M g) (↑(rTensor M f) x)

tactic: rfl
state_before: R : Type u_1
inst✝¹⁴ : CommSemiring R
R' : Type ?u.1251098
inst✝¹³ : Monoid R'
R'' : Type ?u.1251104
inst✝¹² : Semiring R''
M : Type u_3
N : Type u_2
P : Type u_5
Q : Type u_4
S : Type ?u.1251122
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
x : N ⊗[R] M
⊢ (↑(rTensor M g) ∘ ↑(rTensor M f)) x = ↑(rTensor M g) (↑(rTensor M f) x)
Theorem: AlgebraicIndependent.image_of_comp
File: Mathlib/RingTheory/AlgebraicIndependent.lean

tactic: nontriviality R
state_before: ι✝ : Type ?u.747618
ι'✝ : Type ?u.747621
R : Type u_3
K : Type ?u.747627
A : Type u_4
A' : Type ?u.747633
A'' : Type ?u.747636
V : Type u
V' : Type ?u.747641
x : ι✝ → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
ι : Type u_1
ι' : Type u_2
s : Set ι
f : ι → ι'
g : ι' → A
hs : AlgebraicIndependent R fun x => g (f ↑x)
⊢ AlgebraicIndependent R fun x => g ↑x

tactic: have : InjOn f s := injOn_iff_injective.2 hs.injective.of_comp
state_before: ι✝ : Type ?u.747618
ι'✝ : Type ?u.747621
R : Type u_3
K : Type ?u.747627
A : Type u_4
A' : Type ?u.747633
A'' : Type ?u.747636
V : Type u
V' : Type ?u.747641
x : ι✝ → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
ι : Type u_1
ι' : Type u_2
s : Set ι
f : ι → ι'
g : ι' → A
hs : AlgebraicIndependent R fun x => g (f ↑x)
✝ : Nontrivial R
⊢ AlgebraicIndependent R fun x => g ↑x

tactic: exact (algebraicIndependent_equiv' (Equiv.Set.imageOfInjOn f s this) rfl).1 hs
state_before: ι✝ : Type ?u.747618
ι'✝ : Type ?u.747621
R : Type u_3
K : Type ?u.747627
A : Type u_4
A' : Type ?u.747633
A'' : Type ?u.747636
V : Type u
V' : Type ?u.747641
x : ι✝ → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
ι : Type u_1
ι' : Type u_2
s : Set ι
f : ι → ι'
g : ι' → A
hs : AlgebraicIndependent R fun x => g (f ↑x)
✝ : Nontrivial R
this : InjOn f s
⊢ AlgebraicIndependent R fun x => g ↑x
Theorem: Composition.embedding_comp_inv
File: Mathlib/Combinatorics/Composition.lean

tactic: rw [Fin.ext_iff]
state_before: n : ℕ
c : Composition n
j : Fin n
⊢ ↑(embedding c (index c j)) (invEmbedding c j) = j

tactic: apply add_tsub_cancel_of_le (c.sizeUpTo_index_le j)
state_before: n : ℕ
c : Composition n
j : Fin n
⊢ ↑(↑(embedding c (index c j)) (invEmbedding c j)) = ↑j
Theorem: Cycle.next_reverse_eq_prev
File: Mathlib/Data/List/Cycle.lean

tactic: simp [← prev_reverse_eq_next]
state_before: α : Type u_1
inst✝ : DecidableEq α
s : Cycle α
hs : Nodup s
x : α
hx : x ∈ s
⊢ next (reverse s) (_ : Nodup (reverse s)) x (_ : x ∈ reverse s) = prev s hs x hx