tasksource/leandojo huggingface dataset:
Theorem: FiniteField.pow_card
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: have hp : 0 < Fintype.card K := lt_trans zero_lt_one Fintype.one_lt_card
state_before: K : Type u_1
R : Type ?u.294151
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
⊢ a ^ q = a

tactic: by_cases h : a = 0
state_before: K : Type u_1
R : Type ?u.294151
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
hp : 0 < q
⊢ a ^ q = a

tactic: rw [← Nat.succ_pred_eq_of_pos hp, pow_succ, Nat.pred_eq_sub_one, pow_card_sub_one_eq_one a h,
  mul_one]
state_before: case neg
K : Type u_1
R : Type ?u.294151
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
hp : 0 < q
h : ¬a = 0
⊢ a ^ q = a

tactic: rw [h]
state_before: case pos
K : Type u_1
R : Type ?u.294151
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
hp : 0 < q
h : a = 0
⊢ a ^ q = a

tactic: apply zero_pow hp
state_before: case pos
K : Type u_1
R : Type ?u.294151
inst✝¹ : GroupWithZero K
inst✝ : Fintype K
a : K
hp : 0 < q
h : a = 0
⊢ 0 ^ q = 0
Theorem: GeneralizedContinuedFraction.zeroth_convergent'_eq_h
File: Mathlib/Algebra/ContinuedFractions/Translations.lean

tactic: simp [convergents']
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
⊢ convergents' g 0 = g.h
Theorem: CochainComplex.mk_d_2_0
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: change ite (2 = 1 + 1) (d₁ ≫ 𝟙 X₂) 0 = d₁
state_before: ι : Type ?u.325362
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
X₀ X₁ X₂ : V
d₀ : X₀ ⟶ X₁
d₁ : X₁ ⟶ X₂
s : d₀ ≫ d₁ = 0
succ :
  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ ⟶ X₁) ×' (d₁ : X₁ ⟶ X₂) ×' d₀ ≫ d₁ = 0) →
    (X₃ : V) ×' (d₂ : t.snd.snd.fst ⟶ X₃) ×' t.snd.snd.snd.snd.fst ≫ d₂ = 0
⊢ HomologicalComplex.d (mk X₀ X₁ X₂ d₀ d₁ s succ) 1 2 = d₁

tactic: rw [if_pos rfl, Category.comp_id]
state_before: ι : Type ?u.325362
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
X₀ X₁ X₂ : V
d₀ : X₀ ⟶ X₁
d₁ : X₁ ⟶ X₂
s : d₀ ≫ d₁ = 0
succ :
  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ ⟶ X₁) ×' (d₁ : X₁ ⟶ X₂) ×' d₀ ≫ d₁ = 0) →
    (X₃ : V) ×' (d₂ : t.snd.snd.fst ⟶ X₃) ×' t.snd.snd.snd.snd.fst ≫ d₂ = 0
⊢ (if 2 = 1 + 1 then d₁ ≫ 𝟙 X₂ else 0) = d₁
Theorem: AddCommGroup.add_zsmul_modEq
File: Mathlib/Algebra/ModEq.lean

tactic: simp
state_before: α : Type u_1
inst✝ : AddCommGroup α
p a a₁ a₂ b b₁ b₂ c : α
n : ℕ
z✝ z : ℤ
⊢ a - (a + z • p) = -z • p
Theorem: Set.indicator_diff
File: Mathlib/Algebra/IndicatorFunction.lean

tactic: rw [indicator_diff' h, sub_eq_add_neg]
state_before: α : Type u_2
β : Type ?u.99527
ι : Type ?u.99530
M : Type ?u.99533
N : Type ?u.99536
G✝ : Type ?u.99539
inst✝¹ : Group G✝
s✝ t✝ : Set α
f✝ g : α → G✝
a : α
G : Type u_1
inst✝ : AddGroup G
s t : Set α
h : s ⊆ t
f : α → G
⊢ indicator (t \ s) f = indicator t f - indicator s f
Theorem: MeasureTheory.LpAddConst_zero
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: rw [LpAddConst, if_neg]
state_before: α : Type ?u.3022377
E : Type ?u.3022380
F : Type ?u.3022383
G : Type ?u.3022386
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ LpAddConst 0 = 1

tactic: intro h
state_before: case hnc
α : Type ?u.3022377
E : Type ?u.3022380
F : Type ?u.3022383
G : Type ?u.3022386
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ ¬0 ∈ Set.Ioo 0 1

tactic: exact lt_irrefl _ h.1
state_before: case hnc
α : Type ?u.3022377
E : Type ?u.3022380
F : Type ?u.3022383
G : Type ?u.3022386
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
h : 0 ∈ Set.Ioo 0 1
⊢ False
Theorem: Nat.dvd_left_iff_eq
File: Mathlib/Data/Nat/Order/Lemmas.lean

tactic: rw [h]
state_before: a b m✝ n✝¹ k m n✝ : ℕ
h : m = n✝
n : ℕ
⊢ n ∣ m ↔ n ∣ n✝
Theorem: pow_bit1
File: Mathlib/Algebra/GroupPower/Basic.lean

tactic: rw [bit1, pow_succ', pow_bit0]
state_before: α : Type ?u.35419
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝¹ : Monoid M
inst✝ : AddMonoid A
a : M
n : ℕ
⊢ a ^ bit1 n = a ^ n * a ^ n * a
Theorem: Multiset.Nodup.toFinset_inj
File: Mathlib/Data/Finset/Basic.lean

tactic: simpa [← toFinset_eq hl, ← toFinset_eq hl'] using h
state_before: α : Type u_1
β : Type ?u.444282
γ : Type ?u.444285
inst✝ : DecidableEq α
s t l l' : Multiset α
hl : Nodup l
hl' : Nodup l'
h : toFinset l = toFinset l'
⊢ l = l'
Theorem: CategoryTheory.isIso_of_fully_faithful
File: Mathlib/CategoryTheory/Functor/FullyFaithful.lean

tactic: simp
state_before: C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
F : C ⥤ D
inst✝² : Full F
inst✝¹ : Faithful F
X Y Z : C
f : X ⟶ Y
inst✝ : IsIso (F.map f)
⊢ F.map (f ≫ F.preimage (inv (F.map f))) = F.map (𝟙 X)

tactic: simp
state_before: C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
F : C ⥤ D
inst✝² : Full F
inst✝¹ : Faithful F
X Y Z : C
f : X ⟶ Y
inst✝ : IsIso (F.map f)
⊢ F.map (F.preimage (inv (F.map f)) ≫ f) = F.map (𝟙 Y)
Theorem: Nat.right_le_pair
File: Mathlib/Data/Nat/Pairing.lean

tactic: by_cases h : a < b <;> simp [pair, h]
state_before: a b : ℕ
⊢ b ≤ pair a b

tactic: exact le_trans (le_mul_self _) (Nat.le_add_right _ _)
state_before: case pos
a b : ℕ
h : a < b
⊢ b ≤ b * b + a
Theorem: div_le_self
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: simpa only [div_one] using div_le_div_of_le_left ha zero_lt_one hb
state_before: ι : Type ?u.72135
α : Type u_1
β : Type ?u.72141
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 ≤ a
hb : 1 ≤ b
⊢ a / b ≤ a
Theorem: clusterPt_principal_iff_frequently
File: Mathlib/Topology/Basic.lean

tactic: simp only [clusterPt_principal_iff, frequently_iff, Set.Nonempty, exists_prop, mem_inter_iff]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
x : α
s : Set α
⊢ ClusterPt x (𝓟 s) ↔ ∃ᶠ (y : α) in 𝓝 x, y ∈ s
Theorem: Algebra.mem_iInf
File: Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

tactic: simp only [iInf, mem_sInf, Set.forall_range_iff]
state_before: R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
ι : Sort u_1
S : ι → Subalgebra R A
x : A
⊢ (x ∈ ⨅ (i : ι), S i) ↔ ∀ (i : ι), x ∈ S i
Theorem: ProbabilityTheory.kernel.lintegral_deterministic'
File: Mathlib/Probability/Kernel/Basic.lean

tactic: rw [kernel.deterministic_apply, lintegral_dirac' _ hf]
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.397552
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
f : β → ℝ≥0∞
g : α → β
a : α
hg : Measurable g
hf : Measurable f
⊢ (∫⁻ (x : β), f x ∂↑(deterministic g hg) a) = f (g a)
Theorem: Matrix.det_updateColumn_smul'
File: Mathlib/LinearAlgebra/Matrix/Determinant.lean

tactic: rw [← det_transpose, ← updateRow_transpose, transpose_smul, det_updateRow_smul']
state_before: m : Type ?u.1659297
n : Type u_1
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
M : Matrix n n R
j : n
s : R
u : n → R
⊢ det (updateColumn (s • M) j u) = s ^ (Fintype.card n - 1) * det (updateColumn M j u)

tactic: simp [updateRow_transpose, det_transpose]
state_before: m : Type ?u.1659297
n : Type u_1
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
M : Matrix n n R
j : n
s : R
u : n → R
⊢ s ^ (Fintype.card n - 1) * det (updateRow Mᵀ j u) = s ^ (Fintype.card n - 1) * det (updateColumn M j u)
Theorem: Polynomial.C'_mem_lifts
File: Mathlib/Data/Polynomial/Lifts.lean

tactic: obtain ⟨r, rfl⟩ := Set.mem_range.1 h
state_before: R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f✝ f : R →+* S
s : S
h : s ∈ Set.range ↑f
⊢ ↑C s ∈ lifts f

tactic: use C r
state_before: case intro
R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f✝ f : R →+* S
r : R
h : ↑f r ∈ Set.range ↑f
⊢ ↑C (↑f r) ∈ lifts f

tactic: simp only [coe_mapRingHom, map_C, Set.mem_univ, Subsemiring.coe_top, eq_self_iff_true,
  and_self_iff]
state_before: case intro
R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f✝ f : R →+* S
r : R
h : ↑f r ∈ Set.range ↑f
⊢ ↑(mapRingHom f) (↑C r) = ↑C (↑f r)
Theorem: dvd_sub
File: Mathlib/Algebra/Ring/Divisibility.lean

tactic: simpa only [← sub_eq_add_neg] using h₁.add h₂.neg_right
state_before: α : Type u_1
β : Type ?u.8179
inst✝ : NonUnitalRing α
a b c : α
h₁ : a ∣ b
h₂ : a ∣ c
⊢ a ∣ b - c
Theorem: ProbabilityTheory.kernel.sum_zero
File: Mathlib/Probability/Kernel/Basic.lean

tactic: ext a s
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Countable ι
⊢ (kernel.sum fun x => 0) = 0

tactic: intro hs
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Countable ι
a : α
s : Set β
⊢ MeasurableSet s → ↑↑(↑(kernel.sum fun x => 0) a) s = ↑↑(↑0 a) s

tactic: rw [sum_apply' _ a hs]
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Countable ι
a : α
s : Set β
hs : MeasurableSet s
⊢ ↑↑(↑(kernel.sum fun x => 0) a) s = ↑↑(↑0 a) s

tactic: simp only [zero_apply, Measure.coe_zero, Pi.zero_apply, tsum_zero]
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Countable ι
a : α
s : Set β
hs : MeasurableSet s
⊢ (∑' (n : ι), ↑↑(↑0 a) s) = ↑↑(↑0 a) s
Theorem: linearIndependent_iff'
File: Mathlib/LinearAlgebra/LinearIndependent.lean

tactic: simpa only [LinearMap.map_sum, Finsupp.total_single] using hg
state_before: ι : Type u'
ι' : Type ?u.13258
R : Type u_1
K : Type ?u.13264
M : Type u_2
M' : Type ?u.13270
M'' : Type ?u.13273
V : Type u
V' : Type ?u.13278
v : ι → M
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
a b : R
x y : M
hf : ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0 → l = 0
s : Finset ι
g : ι → R
hg : ∑ i in s, g i • v i = 0
i : ι
his : i ∈ s
⊢ ↑(Finsupp.total ι M R v) (∑ i in s, Finsupp.single i (g i)) = 0

tactic: rw [Finsupp.lapply_apply, Finsupp.single_eq_of_ne hji]
state_before: ι : Type u'
ι' : Type ?u.13258
R : Type u_1
K : Type ?u.13264
M : Type u_2
M' : Type ?u.13270
M'' : Type ?u.13273
V : Type u
V' : Type ?u.13278
v : ι → M
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
a b : R
x y : M
hf : ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0 → l = 0
s : Finset ι
g : ι → R
hg : ∑ i in s, g i • v i = 0
i : ι
his : i ∈ s
h : ∑ i in s, Finsupp.single i (g i) = 0
j : ι
_hjs : j ∈ s
hji : j ≠ i
⊢ ↑(Finsupp.lapply i) (Finsupp.single j (g j)) = 0
Theorem: Finset.map_val_val_powersetLen
File: Mathlib/Data/Finset/Powerset.lean

tactic: simp [Finset.powersetLen, map_pmap, pmap_eq_map, map_id']
state_before: α : Type u_1
s✝ t s : Finset α
i : ℕ
⊢ Multiset.map val (powersetLen i s).val = Multiset.powersetLen i s.val
Theorem: upperClosure_mul
File: Mathlib/Algebra/Order/UpperLower.lean

tactic: simp_rw [mul_comm _ t]
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
⊢ ↑(upperClosure s) * t = ↑(upperClosure (s * t))

tactic: exact mul_upperClosure _ _
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
⊢ t * ↑(upperClosure s) = ↑(upperClosure (t * s))
Theorem: CategoryTheory.Subobject.mk_arrow
File: Mathlib/CategoryTheory/Subobject/Basic.lean

tactic: obtain ⟨e⟩ := @Quotient.mk_out' _ (isIsomorphicSetoid _) Q
state_before: C : Type u₁
inst✝¹ : Category C
X Y Z : C
D : Type u₂
inst✝ : Category D
P : Subobject X
Q : MonoOver X
⊢ mk (arrow (Quotient.mk'' Q)) = Quotient.mk'' Q

tactic: exact Quotient.sound' ⟨MonoOver.isoMk (Iso.refl _)  ≪≫ e⟩
state_before: case intro
C : Type u₁
inst✝¹ : Category C
X Y Z : C
D : Type u₂
inst✝ : Category D
P : Subobject X
Q : MonoOver X
e : Quotient.out' (Quotient.mk'' Q) ≅ Q
⊢ mk (arrow (Quotient.mk'' Q)) = Quotient.mk'' Q
Theorem: Set.iUnion_Ioc_left
File: Mathlib/Data/Set/Intervals/Disjoint.lean

tactic: simp only [← Ioi_inter_Iic, ← iUnion_inter, iUnion_Ioi, univ_inter]
state_before: ι : Sort u
α : Type v
β : Type w
inst✝¹ : Preorder α
a b✝ c : α
inst✝ : NoMinOrder α
b : α
⊢ (⋃ (a : α), Ioc a b) = Iic b
Theorem: SimpleGraph.Walk.IsTrail.nil
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: simp [edges]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u : V
⊢ List.Nodup (edges Walk.nil)
Theorem: CategoryTheory.μ_inv_naturalityᵣ
File: Mathlib/CategoryTheory/Monoidal/End.lean

tactic: rw [← IsIso.comp_inv_eq, Category.assoc, ← IsIso.eq_inv_comp]
state_before: C : Type u
inst✝² : Category C
M : Type u_2
inst✝¹ : Category M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m n n' : M
g : n ⟶ n'
X : C
⊢ (MonoidalFunctor.μIso F m n).inv.app X ≫ (F.map g).app ((F.obj m).obj X) =
    (F.map (𝟙 m ⊗ g)).app X ≫ (MonoidalFunctor.μIso F m n').inv.app X

tactic: simp
state_before: C : Type u
inst✝² : Category C
M : Type u_2
inst✝¹ : Category M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m n n' : M
g : n ⟶ n'
X : C
⊢ (F.map g).app ((F.obj m).obj X) ≫ inv ((MonoidalFunctor.μIso F m n').inv.app X) =
    inv ((MonoidalFunctor.μIso F m n).inv.app X) ≫ (F.map (𝟙 m ⊗ g)).app X
Theorem: Finset.sup'_eq_csSup_image
File: Mathlib/Order/ConditionallyCompleteLattice/Finset.lean

tactic: apply le_antisymm
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.12263
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
⊢ sup' s H f = sSup (f '' ↑s)

tactic: refine' Finset.sup'_le _ _ fun a ha => _
state_before: case a
α : Type u_2
β : Type u_1
γ : Type ?u.12263
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
⊢ sup' s H f ≤ sSup (f '' ↑s)

tactic: refine' le_csSup ⟨s.sup' H f, _⟩ ⟨a, ha, rfl⟩
state_before: case a
α : Type u_2
β : Type u_1
γ : Type ?u.12263
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
a : α
ha : a ∈ s
⊢ f a ≤ sSup (f '' ↑s)

tactic: rintro i ⟨j, hj, rfl⟩
state_before: case a
α : Type u_2
β : Type u_1
γ : Type ?u.12263
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
a : α
ha : a ∈ s
⊢ sup' s H f ∈ upperBounds (f '' ↑s)

tactic: exact Finset.le_sup' _ hj
state_before: case a.intro.intro
α : Type u_2
β : Type u_1
γ : Type ?u.12263
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
a : α
ha : a ∈ s
j : α
hj : j ∈ ↑s
⊢ f j ≤ sup' s H f

tactic: apply csSup_le ((coe_nonempty.mpr H).image _)
state_before: case a
α : Type u_2
β : Type u_1
γ : Type ?u.12263
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
⊢ sSup (f '' ↑s) ≤ sup' s H f

tactic: rintro _ ⟨a, ha, rfl⟩
state_before: case a
α : Type u_2
β : Type u_1
γ : Type ?u.12263
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
⊢ ∀ (b : β), b ∈ f '' ↑s → b ≤ sup' s H f

tactic: exact Finset.le_sup' _ ha
state_before: case a.intro.intro
α : Type u_2
β : Type u_1
γ : Type ?u.12263
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
a : α
ha : a ∈ ↑s
⊢ f a ≤ sup' s H f
Theorem: PrimeSpectrum.basicOpen_pow
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: simpa using zeroLocus_singleton_pow f n hn
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R
n : ℕ
hn : 0 < n
⊢ ↑(basicOpen (f ^ n)) = ↑(basicOpen f)
Theorem: sSup_disjoint_iff
File: Mathlib/Order/CompleteBooleanAlgebra.lean

tactic: simp only [disjoint_iff, sSup_inf_eq, iSup_eq_bot]
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort ?u.10538
inst✝ : Frame α
s✝ t : Set α
a b : α
s : Set α
⊢ Disjoint (sSup s) a ↔ ∀ (b : α), b ∈ s → Disjoint b a
Theorem: PFunctor.Approx.approx_eta
File: Mathlib/Data/PFunctor/Univariate/M.lean

tactic: cases x
state_before: F : PFunctor
n : ℕ
x : CofixA F (n + 1)
⊢ x = CofixA.intro (head' x) (children' x)

tactic: rfl
state_before: case intro
F : PFunctor
n : ℕ
a✝¹ : F.A
a✝ : B F a✝¹ → CofixA F (Nat.add n 0)
⊢ CofixA.intro a✝¹ a✝ = CofixA.intro (head' (CofixA.intro a✝¹ a✝)) (children' (CofixA.intro a✝¹ a✝))
Theorem: Fin.cycleRange_apply
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: split_ifs with h₁ h₂
state_before: n : ℕ
i j : Fin (Nat.succ n)
⊢ ↑(cycleRange i) j = if j < i then j + 1 else if j = i then 0 else j

tactic: exact cycleRange_of_lt h₁
state_before: case inl
n : ℕ
i j : Fin (Nat.succ n)
h₁ : j < i
⊢ ↑(cycleRange i) j = j + 1

tactic: exact cycleRange_of_eq h₂
state_before: case inr.inl
n : ℕ
i j : Fin (Nat.succ n)
h₁ : ¬j < i
h₂ : j = i
⊢ ↑(cycleRange i) j = 0

tactic: exact cycleRange_of_gt (lt_of_le_of_ne (le_of_not_gt h₁) (Ne.symm h₂))
state_before: case inr.inr
n : ℕ
i j : Fin (Nat.succ n)
h₁ : ¬j < i
h₂ : ¬j = i
⊢ ↑(cycleRange i) j = j
Theorem: List.map₂Right_eq_zipWith
File: Mathlib/Data/List/Basic.lean

tactic: have : (fun a b => flip f a (some b)) = flip fun a b => f (some a) b := rfl
state_before: ι : Type ?u.476103
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : Option α → β → γ
a : α
as : List α
b : β
bs : List β
h : length bs ≤ length as
⊢ map₂Right f as bs = zipWith (fun a b => f (some a) b) as bs

tactic: simp only [map₂Right, map₂Left_eq_zipWith, zipWith_flip, *]
state_before: ι : Type ?u.476103
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : Option α → β → γ
a : α
as : List α
b : β
bs : List β
h : length bs ≤ length as
this : (fun a b => flip f a (some b)) = flip fun a b => f (some a) b
⊢ map₂Right f as bs = zipWith (fun a b => f (some a) b) as bs
Theorem: Nat.preimage_Ici
File: Mathlib/Algebra/Order/Floor.lean

tactic: ext
state_before: F : Type ?u.74183
α : Type u_1
β : Type ?u.74189
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a : α
⊢ Nat.cast ⁻¹' Ici a = Ici ⌈a⌉₊

tactic: simp [ceil_le]
state_before: case h
F : Type ?u.74183
α : Type u_1
β : Type ?u.74189
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a : α
x✝ : ℕ
⊢ x✝ ∈ Nat.cast ⁻¹' Ici a ↔ x✝ ∈ Ici ⌈a⌉₊
Theorem: Finset.sdiff_eq_filter
File: Mathlib/Data/Finset/Basic.lean

tactic: simp [mem_sdiff, mem_filter]
state_before: α : Type u_1
β : Type ?u.398605
γ : Type ?u.398608
p q : α → Prop
inst✝² : DecidablePred p
inst✝¹ : DecidablePred q
inst✝ : DecidableEq α
s₁ s₂ : Finset α
x✝ : α
⊢ x✝ ∈ s₁ \ s₂ ↔ x✝ ∈ filter (fun x => ¬x ∈ s₂) s₁
Theorem: Function.Semiconj.injOn_preimage
File: Mathlib/Data/Set/Function.lean

tactic: intro x hx y hy H
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.113510
ι : Sort ?u.113513
π : α → Type ?u.113518
fa : α → α
fb : β → β
f : α → β
g : β → γ
s✝ t : Set α
h : Semiconj f fa fb
s : Set β
hb : InjOn fb s
hf : InjOn f (f ⁻¹' s)
⊢ InjOn fa (f ⁻¹' s)

tactic: have := congr_arg f H
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.113510
ι : Sort ?u.113513
π : α → Type ?u.113518
fa : α → α
fb : β → β
f : α → β
g : β → γ
s✝ t : Set α
h : Semiconj f fa fb
s : Set β
hb : InjOn fb s
hf : InjOn f (f ⁻¹' s)
x : α
hx : x ∈ f ⁻¹' s
y : α
hy : y ∈ f ⁻¹' s
H : fa x = fa y
⊢ x = y

tactic: rw [h.eq, h.eq] at this
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.113510
ι : Sort ?u.113513
π : α → Type ?u.113518
fa : α → α
fb : β → β
f : α → β
g : β → γ
s✝ t : Set α
h : Semiconj f fa fb
s : Set β
hb : InjOn fb s
hf : InjOn f (f ⁻¹' s)
x : α
hx : x ∈ f ⁻¹' s
y : α
hy : y ∈ f ⁻¹' s
H : fa x = fa y
this : f (fa x) = f (fa y)
⊢ x = y

tactic: exact hf hx hy (hb hx hy this)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.113510
ι : Sort ?u.113513
π : α → Type ?u.113518
fa : α → α
fb : β → β
f : α → β
g : β → γ
s✝ t : Set α
h : Semiconj f fa fb
s : Set β
hb : InjOn fb s
hf : InjOn f (f ⁻¹' s)
x : α
hx : x ∈ f ⁻¹' s
y : α
hy : y ∈ f ⁻¹' s
H : fa x = fa y
this : fb (f x) = fb (f y)
⊢ x = y
Theorem: Nat.Prime.multiplicity_choose_aux
File: Mathlib/Data/Nat/Multiplicity.lean

tactic: simp only [add_tsub_cancel_of_le hkn]
state_before: p n b k : ℕ
hp : Prime p
hkn : k ≤ n
⊢ ∑ i in Ico 1 b, n / p ^ i = ∑ i in Ico 1 b, (k + (n - k)) / p ^ i

tactic: simp only [Nat.add_div (pow_pos hp.pos _)]
state_before: p n b k : ℕ
hp : Prime p
hkn : k ≤ n
⊢ ∑ i in Ico 1 b, (k + (n - k)) / p ^ i =
    ∑ i in Ico 1 b, (k / p ^ i + (n - k) / p ^ i + if p ^ i ≤ k % p ^ i + (n - k) % p ^ i then 1 else 0)

tactic: simp [sum_add_distrib, sum_boole]
state_before: p n b k : ℕ
hp : Prime p
hkn : k ≤ n
⊢ ∑ i in Ico 1 b, (k / p ^ i + (n - k) / p ^ i + if p ^ i ≤ k % p ^ i + (n - k) % p ^ i then 1 else 0) =
    ∑ i in Ico 1 b, k / p ^ i + ∑ i in Ico 1 b, (n - k) / p ^ i +
      card (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b))
Theorem: FirstOrder.Language.Theory.SemanticallyEquivalent.imp
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: simp_rw [SemanticallyEquivalent, ModelsBoundedFormula, BoundedFormula.realize_iff,
  BoundedFormula.realize_imp]
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
φ ψ φ' ψ' : BoundedFormula L α n
h : SemanticallyEquivalent T φ ψ
h' : SemanticallyEquivalent T φ' ψ'
⊢ SemanticallyEquivalent T (φ ⟹ φ') (ψ ⟹ ψ')

tactic: exact fun M v xs => imp_congr h.realize_bd_iff h'.realize_bd_iff
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
φ ψ φ' ψ' : BoundedFormula L α n
h : SemanticallyEquivalent T φ ψ
h' : SemanticallyEquivalent T φ' ψ'
⊢ ∀ (M : ModelType T) (v : α → ↑M) (xs : Fin n → ↑M),
    BoundedFormula.Realize φ v xs → BoundedFormula.Realize φ' v xs ↔
      BoundedFormula.Realize ψ v xs → BoundedFormula.Realize ψ' v xs
Theorem: Multiset.filter_singleton
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp only [singleton, filter_cons, filter_zero, add_zero, empty_eq_zero]
state_before: α : Type u_1
β : Type ?u.231954
γ : Type ?u.231957
p✝ : α → Prop
inst✝¹ : DecidablePred p✝
a : α
p : α → Prop
inst✝ : DecidablePred p
⊢ filter p {a} = if p a then {a} else ∅
Theorem: compl_sdiff
File: Mathlib/Order/BooleanAlgebra.lean

tactic: rw [sdiff_eq, himp_eq, compl_inf, compl_compl, sup_comm]
state_before: α : Type u
β : Type ?u.59151
w x y z : α
inst✝ : BooleanAlgebra α
⊢ (x \ y)ᶜ = x ⇨ y
Theorem: LowerAdjoint.closure_union_closure
File: Mathlib/Order/Closure.lean

tactic: rw [closure_union_closure_right, closure_union_closure_left]
state_before: α : Type u_1
ι : Sort ?u.30384
κ : ι → Sort ?u.30389
β : Type u_2
inst✝ : SetLike α β
l : LowerAdjoint SetLike.coe
x y : α
⊢ toFun l (↑(toFun l ↑x) ∪ ↑(toFun l ↑y)) = toFun l (↑x ∪ ↑y)
Theorem: Multiset.noncommProd_cons
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: induction s using Quotient.inductionOn
state_before: F : Type ?u.10023
ι : Type ?u.10026
α : Type u_1
β : Type ?u.10032
γ : Type ?u.10035
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
s : Multiset α
a : α
comm : Set.Pairwise {x | x ∈ a ::ₘ s} Commute
⊢ noncommProd (a ::ₘ s) comm = a * noncommProd s (_ : Set.Pairwise {x | x ∈ s} Commute)

tactic: simp
state_before: case h
F : Type ?u.10023
ι : Type ?u.10026
α : Type u_1
β : Type ?u.10032
γ : Type ?u.10035
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
a : α
a✝ : List α
comm : Set.Pairwise {x | x ∈ a ::ₘ Quotient.mk (List.isSetoid α) a✝} Commute
⊢ noncommProd (a ::ₘ Quotient.mk (List.isSetoid α) a✝) comm =
    a *
      noncommProd (Quotient.mk (List.isSetoid α) a✝)
        (_ : Set.Pairwise {x | x ∈ Quotient.mk (List.isSetoid α) a✝} Commute)