tasksource/leandojo huggingface dataset:
Theorem: Polynomial.X_pow_add_C_ne_one
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: simpa only [natDegree_X_pow_add_C, natDegree_one] using congr_arg natDegree h
state_before: R : Type u
S : Type v
a✝ b c d : R
n✝ m : ℕ
inst✝¹ : Nontrivial R
inst✝ : Semiring R
n : ℕ
hn : 0 < n
a : R
h : X ^ n + ↑C a = 1
⊢ n = 0
Theorem: Filter.bot_pow
File: Mathlib/Order/Filter/Pointwise.lean

tactic: rw [← tsub_add_cancel_of_le (Nat.succ_le_of_lt <| Nat.pos_of_ne_zero hn), pow_succ, bot_mul]
state_before: F : Type ?u.242140
α : Type u_1
β : Type ?u.242146
γ : Type ?u.242149
δ : Type ?u.242152
ε : Type ?u.242155
inst✝ : Monoid α
f g : Filter α
s : Set α
a : α
m n✝ n : ℕ
hn : n ≠ 0
⊢ ⊥ ^ n = ⊥
Theorem: MvPolynomial.eval₂_add
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: classical exact Finsupp.sum_add_index (by simp [f.map_zero]) (by simp [add_mul, f.map_add])
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
⊢ eval₂ f g (p + q) = eval₂ f g p + eval₂ f g q

tactic: exact Finsupp.sum_add_index (by simp [f.map_zero]) (by simp [add_mul, f.map_add])
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
⊢ eval₂ f g (p + q) = eval₂ f g p + eval₂ f g q

tactic: simp [f.map_zero]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
⊢ ∀ (a : σ →₀ ℕ), a ∈ p.support ∪ q.support → (↑f 0 * Finsupp.prod a fun n e => g n ^ e) = 0

tactic: simp [add_mul, f.map_add]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
⊢ ∀ (a : σ →₀ ℕ),
    a ∈ p.support ∪ q.support →
      ∀ (b₁ b₂ : R),
        (↑f (b₁ + b₂) * Finsupp.prod a fun n e => g n ^ e) =
          (↑f b₁ * Finsupp.prod a fun n e => g n ^ e) + ↑f b₂ * Finsupp.prod a fun n e => g n ^ e
Theorem: Units.mul_right_inj
File: Mathlib/Algebra/Group/Units.lean

tactic: simpa only [inv_mul_cancel_left] using congr_arg (fun x : α => ↑(a⁻¹ : αˣ) * x) h
state_before: α : Type u
inst✝ : Monoid α
a✝ b✝ c✝ u a : αˣ
b c : α
h : ↑a * b = ↑a * c
⊢ b = c
Theorem: MeasureTheory.Measure.QuasiMeasurePreserving.limsup_preimage_iterate_ae_eq
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: intro n
state_before: α : Type u_1
β : Type ?u.495766
γ : Type ?u.495769
δ : Type ?u.495772
ι : Type ?u.495775
R : Type ?u.495778
R' : Type ?u.495781
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
⊢ ∀ (n : ℕ), (preimage f^[n]) s =ᵐ[μ] s

tactic: induction' n with n ih
state_before: α : Type u_1
β : Type ?u.495766
γ : Type ?u.495769
δ : Type ?u.495772
ι : Type ?u.495775
R : Type ?u.495778
R' : Type ?u.495781
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
n : ℕ
⊢ (preimage f^[n]) s =ᵐ[μ] s

tactic: simpa only [iterate_succ', comp_apply] using ae_eq_trans (hf.ae_eq ih) hs
state_before: case succ
α : Type u_1
β : Type ?u.495766
γ : Type ?u.495769
δ : Type ?u.495772
ι : Type ?u.495775
R : Type ?u.495778
R' : Type ?u.495781
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
n : ℕ
ih : (preimage f^[n]) s =ᵐ[μ] s
⊢ (preimage f^[Nat.succ n]) s =ᵐ[μ] s

tactic: rfl
state_before: case zero
α : Type u_1
β : Type ?u.495766
γ : Type ?u.495769
δ : Type ?u.495772
ι : Type ?u.495775
R : Type ?u.495778
R' : Type ?u.495781
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
⊢ (preimage f^[Nat.zero]) s =ᵐ[μ] s
Theorem: AlgebraicGeometry.StructureSheaf.comap_id
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

tactic: rwa [hUV, PrimeSpectrum.comap_id]
state_before: R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
hUV : U = V
p : ↑(PrimeSpectrum.Top R)
hpV : p ∈ V.carrier
⊢ p ∈ ↑(PrimeSpectrum.comap (RingHom.id R)) ⁻¹' U.carrier

tactic: rw [hUV]
state_before: R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
hUV : U = V
⊢ (structureSheaf R).val.obj U.op = (structureSheaf R).val.obj V.op

tactic: erw [comap_id_eq_map U V (eqToHom hUV.symm), eqToHom_op, eqToHom_map]
state_before: R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
hUV : U = V
⊢ comap (RingHom.id R) U V
      (_ : ∀ (p : ↑(PrimeSpectrum.Top R)), p ∈ V.carrier → p ∈ ↑(PrimeSpectrum.comap (RingHom.id R)) ⁻¹' U.carrier) =
    eqToHom (_ : (structureSheaf R).val.obj U.op = (structureSheaf R).val.obj V.op)
Theorem: MeasureTheory.OuterMeasure.restrict_sInf_eq_sInf_restrict
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: simp only [sInf_eq_iInf, restrict_biInf, hm, iInf_image]
state_before: α : Type u_1
m : Set (OuterMeasure α)
s : Set α
hm : Set.Nonempty m
⊢ ↑(restrict s) (sInf m) = sInf (↑(restrict s) '' m)
Theorem: CategoryTheory.NatIso.ofComponents.app
File: Mathlib/CategoryTheory/NatIso.lean

tactic: aesop
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
F G : C ⥤ D
X✝ Y : C
app' : (X : C) → F.obj X ≅ G.obj X
naturality : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app' Y).hom = (app' X).hom ≫ G.map f
X : C
⊢ (ofComponents app').app X = app' X
Theorem: Option.mem_map₂_iff
File: Mathlib/Data/Option/NAry.lean

tactic: simp [map₂]
state_before: α : Type u_2
β : Type u_3
γ : Type u_1
f : α → β → γ
a : Option α
b : Option β
c✝ : Option γ
c : γ
⊢ c ∈ map₂ f a b ↔ ∃ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c
Theorem: CategoryTheory.GrothendieckTopology.bot_covers
File: Mathlib/CategoryTheory/Sites/Grothendieck.lean

tactic: rw [covers_iff, bot_covering, ← Sieve.pullback_eq_top_iff_mem]
state_before: C : Type u
inst✝ : Category C
X Y : C
S✝ R : Sieve X
J : GrothendieckTopology C
S : Sieve X
f : Y ⟶ X
⊢ Covers ⊥ S f ↔ S.arrows f
Theorem: Multiset.eq_of_mem_map_const
File: Mathlib/Data/Multiset/Basic.lean

tactic: rwa [map_const] at h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.125652
b₁ b₂ : β
l : List α
h : b₁ ∈ map (const α b₂) ↑l
⊢ b₁ ∈ replicate (?m.125825 h) b₂
Theorem: DirectSum.induction_on
File: Mathlib/Algebra/DirectSum/Basic.lean

tactic: apply Dfinsupp.induction x H_zero
state_before: ι : Type v
dec_ι : DecidableEq ι
β : ι → Type w
inst✝ : (i : ι) → AddCommMonoid (β i)
C : (⨁ (i : ι), β i) → Prop
x : ⨁ (i : ι), β i
H_zero : C 0
H_basic : ∀ (i : ι) (x : β i), C (↑(of β i) x)
H_plus : ∀ (x y : ⨁ (i : ι), β i), C x → C y → C (x + y)
⊢ C x

tactic: intro i b f h1 h2 ih
state_before: ι : Type v
dec_ι : DecidableEq ι
β : ι → Type w
inst✝ : (i : ι) → AddCommMonoid (β i)
C : (⨁ (i : ι), β i) → Prop
x : ⨁ (i : ι), β i
H_zero : C 0
H_basic : ∀ (i : ι) (x : β i), C (↑(of β i) x)
H_plus : ∀ (x y : ⨁ (i : ι), β i), C x → C y → C (x + y)
⊢ ∀ (i : ι) (b : (fun i => β i) i) (f : Π₀ (i : ι), (fun i => β i) i),
    ↑f i = 0 → b ≠ 0 → C f → C (Dfinsupp.single i b + f)

tactic: solve_by_elim
state_before: ι : Type v
dec_ι : DecidableEq ι
β : ι → Type w
inst✝ : (i : ι) → AddCommMonoid (β i)
C : (⨁ (i : ι), β i) → Prop
x : ⨁ (i : ι), β i
H_zero : C 0
H_basic : ∀ (i : ι) (x : β i), C (↑(of β i) x)
H_plus : ∀ (x y : ⨁ (i : ι), β i), C x → C y → C (x + y)
i : ι
b : β i
f : Π₀ (i : ι), (fun i => β i) i
h1 : ↑f i = 0
h2 : b ≠ 0
ih : C f
⊢ C (Dfinsupp.single i b + f)
Theorem: Quaternion.tsum_coe
File: Mathlib/Analysis/Quaternion.lean

tactic: by_cases hf : Summable f
state_before: α : Type u_1
f : α → ℝ
⊢ (∑' (a : α), ↑(f a)) = ↑(∑' (a : α), f a)

tactic: exact (hasSum_coe.mpr hf.hasSum).tsum_eq
state_before: case pos
α : Type u_1
f : α → ℝ
hf : Summable f
⊢ (∑' (a : α), ↑(f a)) = ↑(∑' (a : α), f a)

tactic: simp [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable (summable_coe.not.mpr hf)]
state_before: case neg
α : Type u_1
f : α → ℝ
hf : ¬Summable f
⊢ (∑' (a : α), ↑(f a)) = ↑(∑' (a : α), f a)
Theorem: Nat.Prime.eq_of_factorization_pos
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: simpa [hp.factorization, single_apply] using h
state_before: p q : ℕ
hp : Prime p
h : ↑(Nat.factorization p) q ≠ 0
⊢ p = q
Theorem: Nat.prime_three
File: Mathlib/Data/Nat/Prime.lean

tactic: decide
state_before: ⊢ Prime 3
Theorem: Function.iterate_id
File: Mathlib/Logic/Function/Iterate.lean

tactic: rw [iterate_succ, ihn, comp.left_id]
state_before: α : Type u
β : Type v
f : α → α
n✝ n : ℕ
ihn : id^[n] = id
⊢ id^[Nat.succ n] = id
Theorem: LinearMap.range_eq_top
File: Mathlib/LinearAlgebra/Basic.lean

tactic: rw [SetLike.ext'_iff, range_coe, top_coe, Set.range_iff_surjective]
state_before: R : Type u_1
R₁ : Type ?u.1083452
R₂ : Type u_2
R₃ : Type ?u.1083458
R₄ : Type ?u.1083461
S : Type ?u.1083464
K : Type ?u.1083467
K₂ : Type ?u.1083470
M : Type u_4
M' : Type ?u.1083476
M₁ : Type ?u.1083479
M₂ : Type u_3
M₃ : Type ?u.1083485
M₄ : Type ?u.1083488
N : Type ?u.1083491
N₂ : Type ?u.1083494
ι : Type ?u.1083497
V : Type ?u.1083500
V₂ : Type ?u.1083503
inst✝¹¹ : Semiring R
inst✝¹⁰ : Semiring R₂
inst✝⁹ : Semiring R₃
inst✝⁸ : AddCommMonoid M
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : AddCommMonoid M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
inst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝⁴ : Module R M
inst✝³ : Module R₂ M₂
inst✝² : Module R₃ M₃
σ₂₁ : R₂ →+* R
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
F : Type u_5
sc : SemilinearMapClass F τ₁₂ M M₂
inst✝ : RingHomSurjective τ₁₂
f : F
⊢ range f = ⊤ ↔ Surjective ↑f
Theorem: RingEquiv.toRingHom_comp_symm_toRingHom
File: Mathlib/Algebra/Ring/Equiv.lean

tactic: ext
state_before: F : Type ?u.100208
α : Type ?u.100211
β : Type ?u.100214
R : Type u_1
S : Type u_2
S' : Type ?u.100223
inst✝² : NonAssocSemiring R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring S'
e : R ≃+* S
⊢ RingHom.comp (toRingHom e) (toRingHom (RingEquiv.symm e)) = RingHom.id S

tactic: simp
state_before: case a
F : Type ?u.100208
α : Type ?u.100211
β : Type ?u.100214
R : Type u_1
S : Type u_2
S' : Type ?u.100223
inst✝² : NonAssocSemiring R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring S'
e : R ≃+* S
x✝ : S
⊢ ↑(RingHom.comp (toRingHom e) (toRingHom (RingEquiv.symm e))) x✝ = ↑(RingHom.id S) x✝
Theorem: smul_eq_self_of_preimage_zpow_eq_self
File: Mathlib/Data/Set/Pointwise/Iterate.lean

tactic: rw [(IsFixedPt.preimage_iterate hs j : zpowGroupHom n^[j] ⁻¹' s = s).symm]
state_before: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
⊢ ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s

tactic: rintro g' hg' - ⟨y, hy, rfl⟩
state_before: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
⊢ ∀ {g' : G}, g' ^ n ^ j = 1 → g' • (fun x => x ^ n)^[j] ⁻¹' s ⊆ (fun x => x ^ n)^[j] ⁻¹' s

tactic: change (zpowGroupHom n^[j]) (g' * y) ∈ s
state_before: case intro.intro
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' : G
hg' : g' ^ n ^ j = 1
y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
⊢ (fun x => g' • x) y ∈ (fun x => x ^ n)^[j] ⁻¹' s

tactic: replace hg' : (zpowGroupHom n^[j]) g' = 1
state_before: case intro.intro
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' : G
hg' : g' ^ n ^ j = 1
y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
⊢ (↑(zpowGroupHom n)^[j]) (g' * y) ∈ s

tactic: rwa [MonoidHom.iterate_map_mul, hg', one_mul]
state_before: case intro.intro
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
hg' : (↑(zpowGroupHom n)^[j]) g' = 1
⊢ (↑(zpowGroupHom n)^[j]) (g' * y) ∈ s

tactic: refine' le_antisymm (this hg) _
state_before: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
this : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s
⊢ g • s = s

tactic: conv_lhs => rw [← smul_inv_smul g s]
state_before: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
this : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s
⊢ s ≤ g • s

tactic: replace hg : g⁻¹ ^ n ^ j = 1
state_before: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
this : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s
⊢ g • g⁻¹ • s ≤ g • s

tactic: simpa only [le_eq_subset, set_smul_subset_set_smul_iff] using this hg
state_before: G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
this : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s
hg : g⁻¹ ^ n ^ j = 1
⊢ g • g⁻¹ • s ≤ g • s

tactic: rw [inv_zpow, hg, inv_one]
state_before: case hg
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
this : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s
⊢ g⁻¹ ^ n ^ j = 1

tactic: simpa [zpowGroupHom]
state_before: case hg'
G : Type u_1
inst✝ : CommGroup G
n : ℤ
s : Set G
hs : (fun x => x ^ n) ⁻¹' s = s
g : G
j : ℕ
hg : g ^ n ^ j = 1
g' : G
hg' : g' ^ n ^ j = 1
y : G
hy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s
⊢ (↑(zpowGroupHom n)^[j]) g' = 1
Theorem: Cycle.nontrivial_coe_nodup_iff
File: Mathlib/Data/List/Cycle.lean

tactic: rw [Nontrivial]
state_before: α : Type u_1
l : List α
hl : Nodup l
⊢ Nontrivial ↑l ↔ 2 ≤ List.length l

tactic: rcases l with (_ | ⟨hd, _ | ⟨hd', tl⟩⟩)
state_before: α : Type u_1
l : List α
hl : Nodup l
⊢ (∃ x y _h, x ∈ ↑l ∧ y ∈ ↑l) ↔ 2 ≤ List.length l

tactic: simp
state_before: case nil
α : Type u_1
hl : Nodup []
⊢ (∃ x y _h, x ∈ ↑[] ∧ y ∈ ↑[]) ↔ 2 ≤ List.length []

tactic: simp
state_before: case cons.nil
α : Type u_1
hd : α
hl : Nodup [hd]
⊢ (∃ x y _h, x ∈ ↑[hd] ∧ y ∈ ↑[hd]) ↔ 2 ≤ List.length [hd]

tactic: simp only [mem_cons, exists_prop, mem_coe_iff, List.length, Ne.def, Nat.succ_le_succ_iff,
  zero_le, iff_true_iff]
state_before: case cons.cons
α : Type u_1
hd hd' : α
tl : List α
hl : Nodup (hd :: hd' :: tl)
⊢ (∃ x y _h, x ∈ ↑(hd :: hd' :: tl) ∧ y ∈ ↑(hd :: hd' :: tl)) ↔ 2 ≤ List.length (hd :: hd' :: tl)

tactic: refine' ⟨hd, hd', _, by simp⟩
state_before: case cons.cons
α : Type u_1
hd hd' : α
tl : List α
hl : Nodup (hd :: hd' :: tl)
⊢ ∃ x y, ¬x = y ∧ (x = hd ∨ x = hd' ∨ x ∈ tl) ∧ (y = hd ∨ y = hd' ∨ y ∈ tl)

tactic: simp only [not_or, mem_cons, nodup_cons] at hl
state_before: case cons.cons
α : Type u_1
hd hd' : α
tl : List α
hl : Nodup (hd :: hd' :: tl)
⊢ ¬hd = hd'

tactic: exact hl.left.left
state_before: case cons.cons
α : Type u_1
hd hd' : α
tl : List α
hl : (¬hd = hd' ∧ ¬hd ∈ tl) ∧ ¬hd' ∈ tl ∧ Nodup tl
⊢ ¬hd = hd'

tactic: simp
state_before: α : Type u_1
hd hd' : α
tl : List α
hl : Nodup (hd :: hd' :: tl)
⊢ (hd = hd ∨ hd = hd' ∨ hd ∈ tl) ∧ (hd' = hd ∨ hd' = hd' ∨ hd' ∈ tl)
Theorem: Sum.lex_acc_inr
File: Mathlib/Data/Sum/Basic.lean

tactic: induction' acb with b _ IH
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.32484
δ : Type ?u.32487
r r₁ r₂ : α → α → Prop
s s₁ s₂ : β → β → Prop
a a₁ a₂ : α
b✝ b₁ b₂ : β
x y : α ⊕ β
aca : ∀ (a : α), Acc (Lex r s) (inl a)
b : β
acb : Acc s b
⊢ Acc (Lex r s) (inr b)

tactic: constructor
state_before: case intro
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.32484
δ : Type ?u.32487
r r₁ r₂ : α → α → Prop
s s₁ s₂ : β → β → Prop
a a₁ a₂ : α
b✝¹ b₁ b₂ : β
x y : α ⊕ β
aca : ∀ (a : α), Acc (Lex r s) (inl a)
b✝ b : β
h✝ : ∀ (y : β), s y b → Acc s y
IH : ∀ (y : β), s y b → Acc (Lex r s) (inr y)
⊢ Acc (Lex r s) (inr b)

tactic: intro y h
state_before: case intro.h
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.32484
δ : Type ?u.32487
r r₁ r₂ : α → α → Prop
s s₁ s₂ : β → β → Prop
a a₁ a₂ : α
b✝¹ b₁ b₂ : β
x y : α ⊕ β
aca : ∀ (a : α), Acc (Lex r s) (inl a)
b✝ b : β
h✝ : ∀ (y : β), s y b → Acc s y
IH : ∀ (y : β), s y b → Acc (Lex r s) (inr y)
⊢ ∀ (y : α ⊕ β), Lex r s y (inr b) → Acc (Lex r s) y

tactic: cases' h with _ _ _ b' _ h' a
state_before: case intro.h
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.32484
δ : Type ?u.32487
r r₁ r₂ : α → α → Prop
s s₁ s₂ : β → β → Prop
a a₁ a₂ : α
b✝¹ b₁ b₂ : β
x y✝ : α ⊕ β
aca : ∀ (a : α), Acc (Lex r s) (inl a)
b✝ b : β
h✝ : ∀ (y : β), s y b → Acc s y
IH : ∀ (y : β), s y b → Acc (Lex r s) (inr y)
y : α ⊕ β
h : Lex r s y (inr b)
⊢ Acc (Lex r s) y

tactic: exact IH _ h'
state_before: case intro.h.inr
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.32484
δ : Type ?u.32487
r r₁ r₂ : α → α → Prop
s s₁ s₂ : β → β → Prop
a a₁ a₂ : α
b✝¹ b₁ b₂ : β
x y : α ⊕ β
aca : ∀ (a : α), Acc (Lex r s) (inl a)
b✝ b : β
h✝ : ∀ (y : β), s y b → Acc s y
IH : ∀ (y : β), s y b → Acc (Lex r s) (inr y)
b' : β
h' : s b' b
⊢ Acc (Lex r s) (inr b')

tactic: exact aca _
state_before: case intro.h.sep
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.32484
δ : Type ?u.32487
r r₁ r₂ : α → α → Prop
s s₁ s₂ : β → β → Prop
a✝ a₁ a₂ : α
b✝¹ b₁ b₂ : β
x y : α ⊕ β
aca : ∀ (a : α), Acc (Lex r s) (inl a)
b✝ b : β
h✝ : ∀ (y : β), s y b → Acc s y
IH : ∀ (y : β), s y b → Acc (Lex r s) (inr y)
a : α
⊢ Acc (Lex r s) (inl a)
Theorem: Nat.le_of_dvd
File: Std/Data/Nat/Lemmas.lean

tactic: revert h
state_before: m n : Nat
h : 0 < n
k : Nat
e : n = m * k
⊢ m ≤ n

tactic: rw [e]
state_before: m n k : Nat
e : n = m * k
⊢ 0 < n → m ≤ n

tactic: match k with
| 0 => intro hn; simp at hn
| pk+1 =>
  intro
  have := Nat.mul_le_mul_left m (succ_pos pk)
  rwa [Nat.mul_one] at this
state_before: m n k : Nat
e : n = m * k
⊢ 0 < m * k → m ≤ m * k

tactic: intro hn
state_before: m n k : Nat
e : n = m * 0
⊢ 0 < m * 0 → m ≤ m * 0

tactic: simp at hn
state_before: m n k : Nat
e : n = m * 0
hn : 0 < m * 0
⊢ m ≤ m * 0

tactic: intro
state_before: m n k pk : Nat
e : n = m * (pk + 1)
⊢ 0 < m * (pk + 1) → m ≤ m * (pk + 1)

tactic: have := Nat.mul_le_mul_left m (succ_pos pk)
state_before: m n k pk : Nat
e : n = m * (pk + 1)
h✝ : 0 < m * (pk + 1)
⊢ m ≤ m * (pk + 1)

tactic: rwa [Nat.mul_one] at this
state_before: m n k pk : Nat
e : n = m * (pk + 1)
h✝ : 0 < m * (pk + 1)
this : m * succ 0 ≤ m * succ pk
⊢ m ≤ m * (pk + 1)
Theorem: Equiv.Perm.zpow_apply_mem_support
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: simp only [mem_support, ne_eq, apply_zpow_apply_eq_iff]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
n : ℤ
x : α
⊢ ↑(f ^ n) x ∈ support f ↔ x ∈ support f
Theorem: Encodable.iSup_decode₂
File: Mathlib/Logic/Encodable/Lattice.lean

tactic: rw [iSup_comm]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Encodable β
inst✝ : CompleteLattice α
f : β → α
⊢ (⨆ (i : ℕ) (b : β) (_ : b ∈ decode₂ β i), f b) = ⨆ (b : β), f b

tactic: simp only [mem_decode₂, iSup_iSup_eq_right]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Encodable β
inst✝ : CompleteLattice α
f : β → α
⊢ (⨆ (j : β) (i : ℕ) (_ : j ∈ decode₂ β i), f j) = ⨆ (b : β), f b
Theorem: BumpCovering.toPouFun_eq_mul_prod
File: Mathlib/Topology/PartitionOfUnity.lean

tactic: refine' congr_arg _ (finprod_cond_eq_prod_of_cond_iff _ fun {j} hj => _)
state_before: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → ↑(toFun s f j) x ≠ 0 → j ∈ t
⊢ toPouFun f i x = ↑(toFun s f i) x * ∏ j in Finset.filter (fun j => WellOrderingRel j i) t, (1 - ↑(toFun s f j) x)

tactic: rw [Ne.def, sub_eq_self] at hj
state_before: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → ↑(toFun s f j) x ≠ 0 → j ∈ t
j : ι
hj : 1 - ↑(toFun s f j) x ≠ 1
⊢ WellOrderingRel j i ↔ j ∈ Finset.filter (fun j => WellOrderingRel j i) t

tactic: rw [Finset.mem_filter, Iff.comm, and_iff_right_iff_imp]
state_before: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → ↑(toFun s f j) x ≠ 0 → j ∈ t
j : ι
hj : ¬↑(toFun s f j) x = 0
⊢ WellOrderingRel j i ↔ j ∈ Finset.filter (fun j => WellOrderingRel j i) t

tactic: exact flip (ht j) hj
state_before: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → ↑(toFun s f j) x ≠ 0 → j ∈ t
j : ι
hj : ¬↑(toFun s f j) x = 0
⊢ WellOrderingRel j i → j ∈ t
Theorem: Finsupp.support_onFinset
File: Mathlib/Data/Finsupp/Defs.lean

tactic: dsimp [onFinset]
state_before: α : Type u_2
β : Type ?u.176434
γ : Type ?u.176437
ι : Type ?u.176440
M : Type u_1
M' : Type ?u.176446
N : Type ?u.176449
P : Type ?u.176452
G : Type ?u.176455
H : Type ?u.176458
R : Type ?u.176461
S : Type ?u.176464
inst✝¹ : Zero M
inst✝ : DecidableEq M
s : Finset α
f : α → M
hf : ∀ (a : α), f a ≠ 0 → a ∈ s
⊢ (onFinset s f hf).support = filter (fun a => f a ≠ 0) s

tactic: congr
state_before: α : Type u_2
β : Type ?u.176434
γ : Type ?u.176437
ι : Type ?u.176440
M : Type u_1
M' : Type ?u.176446
N : Type ?u.176449
P : Type ?u.176452
G : Type ?u.176455
H : Type ?u.176458
R : Type ?u.176461
S : Type ?u.176464
inst✝¹ : Zero M
inst✝ : DecidableEq M
s : Finset α
f : α → M
hf : ∀ (a : α), f a ≠ 0 → a ∈ s
⊢ filter (fun x => ¬f x = 0) s = filter (fun a => ¬f a = 0) s
Theorem: QuaternionAlgebra.coe_mul
File: Mathlib/Algebra/Quaternion.lean

tactic: ext <;> simp
state_before: S : Type ?u.120411
T : Type ?u.120414
R : Type u_1
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c : ℍ[R,c₁,c₂]
⊢ ↑(x * y) = ↑x * ↑y
Theorem: isAlgebraic_algHom_of_isAlgebraic
File: Mathlib/RingTheory/Algebraic.lean

tactic: rw [aeval_algHom, f.comp_apply, ha, map_zero]
state_before: R : Type u
S : Type ?u.133744
A : Type v
inst✝⁸ : CommRing R
inst✝⁷ : CommRing S
inst✝⁶ : Ring A
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R S
inst✝³ : Algebra S A
inst✝² : IsScalarTower R S A
B : Type u_1
inst✝¹ : Ring B
inst✝ : Algebra R B
f : A →ₐ[R] B
a : A
h : IsAlgebraic R a
p : R[X]
hp : p ≠ 0
ha : ↑(aeval a) p = 0
⊢ ↑(aeval (↑f a)) p = 0
Theorem: Ordnode.Balanced.dual
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [size_dual, size_dual]
state_before: α : Type u_1
size✝ : ℕ
l : Ordnode α
x✝ : α
r : Ordnode α
b : BalancedSz (size l) (size r)
bl : Balanced l
br : Balanced r
⊢ BalancedSz (size (Ordnode.dual r)) (size (Ordnode.dual l))

tactic: exact b.symm
state_before: α : Type u_1
size✝ : ℕ
l : Ordnode α
x✝ : α
r : Ordnode α
b : BalancedSz (size l) (size r)
bl : Balanced l
br : Balanced r
⊢ BalancedSz (size r) (size l)
Theorem: Equiv.permCongr_refl
File: Mathlib/Logic/Equiv/Defs.lean

tactic: simp [permCongr_def]
state_before: α : Sort u
β : Sort v
γ : Sort w
α' : Type u_2
β' : Type u_1
e : α' ≃ β'
⊢ ↑(permCongr e) (Equiv.refl α') = Equiv.refl β'