tasksource/leandojo huggingface dataset:
Theorem: Class.sUnion_apply
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: constructor
state_before: x : Class
y : ZFSet
⊢ (⋃₀ x) y ↔ ∃ z, x z ∧ y ∈ z

tactic: rintro ⟨-, ⟨z, rfl, hxz⟩, hyz⟩
state_before: case mp
x : Class
y : ZFSet
⊢ (⋃₀ x) y → ∃ z, x z ∧ y ∈ z

tactic: exact ⟨z, hxz, hyz⟩
state_before: case mp.intro.intro.intro.intro
x : Class
y z : ZFSet
hxz : x z
hyz : y ∈ ↑z
⊢ ∃ z, x z ∧ y ∈ z

tactic: exact fun ⟨z, hxz, hyz⟩ => ⟨_, coe_mem.2 hxz, hyz⟩
state_before: case mpr
x : Class
y : ZFSet
⊢ (∃ z, x z ∧ y ∈ z) → (⋃₀ x) y
Theorem: Rat.cast_abs
File: Mathlib/Data/Rat/Cast.lean

tactic: simp [abs_eq_max_neg]
state_before: F : Type ?u.64717
ι : Type ?u.64720
α : Type ?u.64723
β : Type ?u.64726
K : Type u_1
inst✝ : LinearOrderedField K
q : ℚ
⊢ ↑(abs q) = abs ↑q
Theorem: Real.comap_exp_atTop
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

tactic: rw [← map_exp_atTop, comap_map exp_injective, map_exp_atTop]
state_before: α : Type ?u.117205
x y z : ℝ
l : Filter α
⊢ comap exp atTop = atTop
Theorem: Submonoid.mrange_inl_sup_mrange_inr
File: Mathlib/GroupTheory/Submonoid/Operations.lean

tactic: simp only [mrange_inl, mrange_inr, prod_bot_sup_bot_prod, top_prod_top]
state_before: M : Type u_1
N : Type u_2
P : Type ?u.157882
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S : Submonoid M
A : Type ?u.157903
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
⊢ mrange (inl M N) ⊔ mrange (inr M N) = ⊤
Theorem: CategoryTheory.Bicategory.whisker_assoc_symm
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f : a ⟶ b
g g' : b ⟶ c
η : g ⟶ g'
h : c ⟶ d
⊢ f ◁ η ▷ h = (α_ f g h).inv ≫ (f ◁ η) ▷ h ≫ (α_ f g' h).hom
Theorem: Equiv.Perm.set_support_apply_mem
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: simp
state_before: α : Type u_1
p✝ q p : Perm α
a : α
⊢ ↑p a ∈ {x | ↑p x ≠ x} ↔ a ∈ {x | ↑p x ≠ x}
Theorem: USize.mod_lt
File: Std/Data/Fin/Lemmas.lean

tactic: simp at h
state_before: a b : USize
h : 0 < b
⊢ b.1.val > 0

tactic: exact h
state_before: a b : USize
h : 0 < toNat b
⊢ b.1.val > 0
Theorem: PartENat.toWithTop_add
File: Mathlib/Data/Nat/PartENat.lean

tactic: refine PartENat.casesOn y ?_ ?_ <;> refine PartENat.casesOn x ?_ ?_
state_before: x y : PartENat
⊢ toWithTop (x + y) = toWithTop x + toWithTop y

tactic: simp only [add_top, toWithTop_top', _root_.add_top]
state_before: case refine_1.refine_1
x y : PartENat
⊢ toWithTop (⊤ + ⊤) = toWithTop ⊤ + toWithTop ⊤

tactic: simp only [add_top, toWithTop_top', toWithTop_natCast', _root_.add_top, forall_const]
state_before: case refine_1.refine_2
x y : PartENat
⊢ ∀ (n : ℕ), toWithTop (↑n + ⊤) = toWithTop ↑n + toWithTop ⊤

tactic: simp only [top_add, toWithTop_top', toWithTop_natCast', _root_.top_add, forall_const]
state_before: case refine_2.refine_1
x y : PartENat
⊢ ∀ (n : ℕ), toWithTop (⊤ + ↑n) = toWithTop ⊤ + toWithTop ↑n

tactic: simp_rw [toWithTop_natCast', ← Nat.cast_add, toWithTop_natCast', forall_const]
state_before: case refine_2.refine_2
x y : PartENat
⊢ ∀ (n n_1 : ℕ), toWithTop (↑n + ↑n_1) = toWithTop ↑n + toWithTop ↑n_1
Theorem: Nat.Primrec'.prec'
File: Mathlib/Computability/Primrec.lean

tactic: simpa using comp' (prec hg hh) (hf.cons idv)
state_before: n : ℕ
f g : Vector ℕ n → ℕ
h : Vector ℕ (n + 2) → ℕ
hf : Primrec' f
hg : Primrec' g
hh : Primrec' h
⊢ Primrec' fun v => Nat.rec (g v) (fun y IH => h (y ::ᵥ IH ::ᵥ v)) (f v)
Theorem: Set.one_mem_center
File: Mathlib/GroupTheory/Subsemigroup/Center.lean

tactic: simp [mem_center_iff]
state_before: M : Type u_1
inst✝ : MulOneClass M
⊢ 1 ∈ center M
Theorem: directed_id
File: Mathlib/Order/Directed.lean

tactic: convert directed_of r
state_before: α : Type u
β : Type v
ι : Sort w
r r' s : α → α → Prop
inst✝ : IsDirected α r
⊢ Directed r id
Theorem: Wbtw.sameRay_vsub_right
File: Mathlib/Analysis/Convex/Between.lean

tactic: rcases h with ⟨t, ⟨_, ht1⟩, rfl⟩
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.367054
P : Type u_3
P' : Type ?u.367060
inst✝³ : StrictOrderedCommRing R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x y z : P
h : Wbtw R x y z
⊢ SameRay R (z -ᵥ x) (z -ᵥ y)

tactic: simpa [lineMap_apply, vsub_vadd_eq_vsub_sub, sub_smul] using
  SameRay.sameRay_nonneg_smul_right (z -ᵥ x) (sub_nonneg.2 ht1)
state_before: case intro.intro.intro
R : Type u_1
V : Type u_2
V' : Type ?u.367054
P : Type u_3
P' : Type ?u.367060
inst✝³ : StrictOrderedCommRing R
inst✝² : AddCommGroup V
inst✝¹ : Module R V
inst✝ : AddTorsor V P
x z : P
t : R
left✝ : 0 ≤ t
ht1 : t ≤ 1
⊢ SameRay R (z -ᵥ x) (z -ᵥ ↑(lineMap x z) t)
Theorem: Relation.TransGen.tail'
File: Mathlib/Logic/Relation.lean

tactic: induction hab generalizing c
state_before: α : Type u_1
β : Type ?u.19655
γ : Type ?u.19658
δ : Type ?u.19661
r : α → α → Prop
a b c d : α
hab : ReflTransGen r a b
hbc : r b c
⊢ TransGen r a c

tactic: case refl => exact single hbc
state_before: case refl
α : Type u_1
β : Type ?u.19655
γ : Type ?u.19658
δ : Type ?u.19661
r : α → α → Prop
a b d c : α
hbc : r a c
⊢ TransGen r a c

case tail
α : Type u_1
β : Type ?u.19655
γ : Type ?u.19658
δ : Type ?u.19661
r : α → α → Prop
a b d b✝ c✝ : α
a✝¹ : ReflTransGen r a b✝
a✝ : r b✝ c✝
a_ih✝ : ∀ {c : α}, r b✝ c → TransGen r a c
c : α
hbc : r c✝ c
⊢ TransGen r a c

tactic: case tail _ _ _ hdb IH => exact tail (IH hdb) hbc
state_before: case tail
α : Type u_1
β : Type ?u.19655
γ : Type ?u.19658
δ : Type ?u.19661
r : α → α → Prop
a b d b✝ c✝ : α
a✝¹ : ReflTransGen r a b✝
a✝ : r b✝ c✝
a_ih✝ : ∀ {c : α}, r b✝ c → TransGen r a c
c : α
hbc : r c✝ c
⊢ TransGen r a c

tactic: exact single hbc
state_before: α : Type u_1
β : Type ?u.19655
γ : Type ?u.19658
δ : Type ?u.19661
r : α → α → Prop
a b d c : α
hbc : r a c
⊢ TransGen r a c

tactic: exact tail (IH hdb) hbc
state_before: α : Type u_1
β : Type ?u.19655
γ : Type ?u.19658
δ : Type ?u.19661
r : α → α → Prop
a b d b✝ c✝ : α
a✝ : ReflTransGen r a b✝
hdb : r b✝ c✝
IH : ∀ {c : α}, r b✝ c → TransGen r a c
c : α
hbc : r c✝ c
⊢ TransGen r a c
Theorem: Finset.coe_infsep
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: have H : (s : Set α).Nontrivial ↔ s.offDiag.Nonempty := by
  rw [← Set.offDiag_nonempty, ← Finset.coe_offDiag, Finset.coe_nonempty]
state_before: α : Type u_1
β : Type ?u.73231
inst✝¹ : PseudoMetricSpace α
x y z : α
s✝ t : Set α
inst✝ : DecidableEq α
s : Finset α
⊢ infsep ↑s = if hs : Finset.Nonempty (Finset.offDiag s) then Finset.inf' (Finset.offDiag s) hs (uncurry dist) else 0

tactic: split_ifs with hs
state_before: α : Type u_1
β : Type ?u.73231
inst✝¹ : PseudoMetricSpace α
x y z : α
s✝ t : Set α
inst✝ : DecidableEq α
s : Finset α
H : Set.Nontrivial ↑s ↔ Finset.Nonempty (Finset.offDiag s)
⊢ infsep ↑s = if hs : Finset.Nonempty (Finset.offDiag s) then Finset.inf' (Finset.offDiag s) hs (uncurry dist) else 0

tactic: rw [← Set.offDiag_nonempty, ← Finset.coe_offDiag, Finset.coe_nonempty]
state_before: α : Type u_1
β : Type ?u.73231
inst✝¹ : PseudoMetricSpace α
x y z : α
s✝ t : Set α
inst✝ : DecidableEq α
s : Finset α
⊢ Set.Nontrivial ↑s ↔ Finset.Nonempty (Finset.offDiag s)

tactic: simp_rw [(H.mpr hs).infsep_of_fintype, ← Finset.coe_offDiag, Finset.toFinset_coe]
state_before: case inl
α : Type u_1
β : Type ?u.73231
inst✝¹ : PseudoMetricSpace α
x y z : α
s✝ t : Set α
inst✝ : DecidableEq α
s : Finset α
H : Set.Nontrivial ↑s ↔ Finset.Nonempty (Finset.offDiag s)
hs : Finset.Nonempty (Finset.offDiag s)
⊢ infsep ↑s = Finset.inf' (Finset.offDiag s) hs (uncurry dist)

tactic: exact (not_nontrivial_iff.mp (H.mp.mt hs)).infsep_zero
state_before: case inr
α : Type u_1
β : Type ?u.73231
inst✝¹ : PseudoMetricSpace α
x y z : α
s✝ t : Set α
inst✝ : DecidableEq α
s : Finset α
H : Set.Nontrivial ↑s ↔ Finset.Nonempty (Finset.offDiag s)
hs : ¬Finset.Nonempty (Finset.offDiag s)
⊢ infsep ↑s = 0
Theorem: Ring.inverse_mul_cancel
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: rcases h with ⟨u, rfl⟩
state_before: α : Type ?u.6577
M₀ : Type u_1
G₀ : Type ?u.6583
M₀' : Type ?u.6586
G₀' : Type ?u.6589
F : Type ?u.6592
F' : Type ?u.6595
inst✝ : MonoidWithZero M₀
x : M₀
h : IsUnit x
⊢ inverse x * x = 1

tactic: rw [inverse_unit, Units.inv_mul]
state_before: case intro
α : Type ?u.6577
M₀ : Type u_1
G₀ : Type ?u.6583
M₀' : Type ?u.6586
G₀' : Type ?u.6589
F : Type ?u.6592
F' : Type ?u.6595
inst✝ : MonoidWithZero M₀
u : M₀ˣ
⊢ inverse ↑u * ↑u = 1
Theorem: Composition.eq_ones_iff
File: Mathlib/Combinatorics/Composition.lean

tactic: constructor
state_before: n : ℕ
c✝ c : Composition n
⊢ c = ones n ↔ ∀ (i : ℕ), i ∈ c.blocks → i = 1

tactic: rintro rfl
state_before: case mp
n : ℕ
c✝ c : Composition n
⊢ c = ones n → ∀ (i : ℕ), i ∈ c.blocks → i = 1

tactic: exact fun i => eq_of_mem_replicate
state_before: case mp
n : ℕ
c : Composition n
⊢ ∀ (i : ℕ), i ∈ (ones n).blocks → i = 1

tactic: intro H
state_before: case mpr
n : ℕ
c✝ c : Composition n
⊢ (∀ (i : ℕ), i ∈ c.blocks → i = 1) → c = ones n

tactic: ext1
state_before: case mpr
n : ℕ
c✝ c : Composition n
H : ∀ (i : ℕ), i ∈ c.blocks → i = 1
⊢ c = ones n

tactic: have A : c.blocks = replicate c.blocks.length 1 := eq_replicate_of_mem H
state_before: case mpr.blocks
n : ℕ
c✝ c : Composition n
H : ∀ (i : ℕ), i ∈ c.blocks → i = 1
⊢ c.blocks = (ones n).blocks

tactic: have : c.blocks.length = n := by
  conv_rhs => rw [← c.blocks_sum, A]
  simp
state_before: case mpr.blocks
n : ℕ
c✝ c : Composition n
H : ∀ (i : ℕ), i ∈ c.blocks → i = 1
A : c.blocks = replicate (List.length c.blocks) 1
⊢ c.blocks = (ones n).blocks

tactic: rw [A, this, ones_blocks]
state_before: case mpr.blocks
n : ℕ
c✝ c : Composition n
H : ∀ (i : ℕ), i ∈ c.blocks → i = 1
A : c.blocks = replicate (List.length c.blocks) 1
this : List.length c.blocks = n
⊢ c.blocks = (ones n).blocks

tactic: conv_rhs => rw [← c.blocks_sum, A]
state_before: n : ℕ
c✝ c : Composition n
H : ∀ (i : ℕ), i ∈ c.blocks → i = 1
A : c.blocks = replicate (List.length c.blocks) 1
⊢ List.length c.blocks = n

tactic: simp
state_before: n : ℕ
c✝ c : Composition n
H : ∀ (i : ℕ), i ∈ c.blocks → i = 1
A : c.blocks = replicate (List.length c.blocks) 1
⊢ List.length c.blocks = sum (replicate (List.length c.blocks) 1)
Theorem: IsUnit.map
File: Mathlib/Algebra/Hom/Units.lean

tactic: rcases h with ⟨y, rfl⟩
state_before: F : Type u_1
G : Type ?u.37609
α : Type ?u.37612
M : Type u_2
N : Type u_3
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : MonoidHomClass F M N
f : F
x : M
h : IsUnit x
⊢ IsUnit (↑f x)

tactic: exact (Units.map (f : M →* N) y).isUnit
state_before: case intro
F : Type u_1
G : Type ?u.37609
α : Type ?u.37612
M : Type u_2
N : Type u_3
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : MonoidHomClass F M N
f : F
y : Mˣ
⊢ IsUnit (↑f ↑y)
Theorem: CategoryTheory.Comma.eqToHom_right
File: Mathlib/CategoryTheory/Comma.lean

tactic: cases H
state_before: A : Type u₁
inst✝² : Category A
B : Type u₂
inst✝¹ : Category B
T : Type u₃
inst✝ : Category T
L : A ⥤ T
R : B ⥤ T
X Y : Comma L R
H : X = Y
⊢ X.right = Y.right

tactic: rfl
state_before: case refl
A : Type u₁
inst✝² : Category A
B : Type u₂
inst✝¹ : Category B
T : Type u₃
inst✝ : Category T
L : A ⥤ T
R : B ⥤ T
X : Comma L R
⊢ X.right = X.right

tactic: cases H
state_before: A : Type u₁
inst✝² : Category A
B : Type u₂
inst✝¹ : Category B
T : Type u₃
inst✝ : Category T
L : A ⥤ T
R : B ⥤ T
X Y : Comma L R
H : X = Y
⊢ (eqToHom H).right = eqToHom (_ : X.right = Y.right)

tactic: rfl
state_before: case refl
A : Type u₁
inst✝² : Category A
B : Type u₂
inst✝¹ : Category B
T : Type u₃
inst✝ : Category T
L : A ⥤ T
R : B ⥤ T
X : Comma L R
⊢ (eqToHom (_ : X = X)).right = eqToHom (_ : X.right = X.right)
Theorem: IsLocalization.map_units_map_submonoid
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: rw [IsScalarTower.algebraMap_apply _ S]
state_before: R : Type u_1
inst✝¹² : CommRing R
M : Submonoid R
S : Type ?u.3235887
inst✝¹¹ : CommRing S
inst✝¹⁰ : Algebra R S
P : Type ?u.3236124
inst✝⁹ : CommRing P
Rₘ : Type ?u.3236130
Sₘ : Type u_2
inst✝⁸ : CommRing Rₘ
inst✝⁷ : CommRing Sₘ
inst✝⁶ : Algebra R Rₘ
inst✝⁵ : IsLocalization M Rₘ
inst✝⁴ : Algebra S Sₘ
i : IsLocalization (Algebra.algebraMapSubmonoid S M) Sₘ
inst✝³ : Algebra Rₘ Sₘ
inst✝² : Algebra R Sₘ
inst✝¹ : IsScalarTower R Rₘ Sₘ
inst✝ : IsScalarTower R S Sₘ
y : { x // x ∈ M }
⊢ IsUnit (↑(algebraMap R Sₘ) ↑y)

tactic: exact IsLocalization.map_units Sₘ ⟨algebraMap R S y, Algebra.mem_algebraMapSubmonoid_of_mem y⟩
state_before: R : Type u_1
inst✝¹² : CommRing R
M : Submonoid R
S : Type ?u.3235887
inst✝¹¹ : CommRing S
inst✝¹⁰ : Algebra R S
P : Type ?u.3236124
inst✝⁹ : CommRing P
Rₘ : Type ?u.3236130
Sₘ : Type u_2
inst✝⁸ : CommRing Rₘ
inst✝⁷ : CommRing Sₘ
inst✝⁶ : Algebra R Rₘ
inst✝⁵ : IsLocalization M Rₘ
inst✝⁴ : Algebra S Sₘ
i : IsLocalization (Algebra.algebraMapSubmonoid S M) Sₘ
inst✝³ : Algebra Rₘ Sₘ
inst✝² : Algebra R Sₘ
inst✝¹ : IsScalarTower R Rₘ Sₘ
inst✝ : IsScalarTower R S Sₘ
y : { x // x ∈ M }
⊢ IsUnit (↑(algebraMap S Sₘ) (↑(algebraMap R S) ↑y))
Theorem: Submodule.span_range_eq_iSup
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [span_eq_iSup_of_singleton_spans, iSup_range]
state_before: R : Type u_3
R₂ : Type ?u.65876
K : Type ?u.65879
M : Type u_2
M₂ : Type ?u.65885
V : Type ?u.65888
S : Type ?u.65891
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
ι : Type u_1
v : ι → M
⊢ span R (range v) = ⨆ (i : ι), span R {v i}
Theorem: QuaternionAlgebra.eq_re_of_eq_coe
File: Mathlib/Algebra/Quaternion.lean

tactic: rw [h, coe_re]
state_before: S : Type ?u.318178
T : Type ?u.318181
R : Type u_1
inst✝ : CommRing R
c₁ c₂ r x✝ y z : R
a✝ b c a : ℍ[R,c₁,c₂]
x : R
h : a = ↑x
⊢ a = ↑a.re
Theorem: ProbabilityTheory.cond_eq_inv_mul_cond_mul
File: Mathlib/Probability/ConditionalProbability.lean

tactic: by_cases ht : μ t = 0
state_before: Ω : Type u_1
m : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
s t : Set Ω
inst✝ : IsFiniteMeasure μ
hms : MeasurableSet s
hmt : MeasurableSet t
⊢ ↑↑(μ[|s]) t = (↑↑μ s)⁻¹ * ↑↑(μ[|t]) s * ↑↑μ t

tactic: simp [cond, ht, Measure.restrict_apply hmt, Or.inr (measure_inter_null_of_null_left s ht)]
state_before: case pos
Ω : Type u_1
m : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
s t : Set Ω
inst✝ : IsFiniteMeasure μ
hms : MeasurableSet s
hmt : MeasurableSet t
ht : ↑↑μ t = 0
⊢ ↑↑(μ[|s]) t = (↑↑μ s)⁻¹ * ↑↑(μ[|t]) s * ↑↑μ t

tactic: rw [mul_assoc, cond_mul_eq_inter μ hmt ht s, Set.inter_comm, cond_apply _ hms]
state_before: case neg
Ω : Type u_1
m : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
s t : Set Ω
inst✝ : IsFiniteMeasure μ
hms : MeasurableSet s
hmt : MeasurableSet t
ht : ¬↑↑μ t = 0
⊢ ↑↑(μ[|s]) t = (↑↑μ s)⁻¹ * ↑↑(μ[|t]) s * ↑↑μ t
Theorem: Real.one_le_rpow
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [← one_rpow z]
state_before: x✝ y z✝ x z : ℝ
hx : 1 ≤ x
hz : 0 ≤ z
⊢ 1 ≤ x ^ z

tactic: exact rpow_le_rpow zero_le_one hx hz
state_before: x✝ y z✝ x z : ℝ
hx : 1 ≤ x
hz : 0 ≤ z
⊢ 1 ^ z ≤ x ^ z
Theorem: neg_lie
File: Mathlib/Algebra/Lie/Basic.lean

tactic: rw [← sub_eq_zero, sub_neg_eq_add, ← add_lie]
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
t : R
x y z : L
m n : M
⊢ ⁅-x, m⁆ = -⁅x, m⁆

tactic: simp
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
t : R
x y z : L
m n : M
⊢ ⁅-x + x, m⁆ = 0
Theorem: Set.pairwise_union
File: Mathlib/Data/Set/Pairwise/Basic.lean

tactic: simp only [Set.Pairwise, mem_union, or_imp, forall_and]
state_before: α : Type u_1
β : Type ?u.8026
γ : Type ?u.8029
ι : Type ?u.8032
ι' : Type ?u.8035
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
⊢ Set.Pairwise (s ∪ t) r ↔
    Set.Pairwise s r ∧ Set.Pairwise t r ∧ ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a ≠ b → r a b ∧ r b a

tactic: exact
  ⟨fun H => ⟨H.1.1, H.2.2, H.2.1, fun x hx y hy hne => H.1.2 y hy x hx hne.symm⟩, fun H =>
    ⟨⟨H.1, fun x hx y hy hne => H.2.2.2 y hy x hx hne.symm⟩, H.2.2.1, H.2.1⟩⟩
state_before: α : Type u_1
β : Type ?u.8026
γ : Type ?u.8029
ι : Type ?u.8032
ι' : Type ?u.8035
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
⊢ (((∀ (x : α), x ∈ s → ∀ (x_1 : α), x_1 ∈ s → x ≠ x_1 → r x x_1) ∧
        ∀ (x : α), x ∈ t → ∀ (x_1 : α), x_1 ∈ s → x ≠ x_1 → r x x_1) ∧
      (∀ (x : α), x ∈ s → ∀ (x_1 : α), x_1 ∈ t → x ≠ x_1 → r x x_1) ∧
        ∀ (x : α), x ∈ t → ∀ (x_1 : α), x_1 ∈ t → x ≠ x_1 → r x x_1) ↔
    (∀ (x : α), x ∈ s → ∀ (x_1 : α), x_1 ∈ s → x ≠ x_1 → r x x_1) ∧
      (∀ (x : α), x ∈ t → ∀ (x_1 : α), x_1 ∈ t → x ≠ x_1 → r x x_1) ∧
        (∀ (x : α), x ∈ s → ∀ (x_1 : α), x_1 ∈ t → x ≠ x_1 → r x x_1) ∧
          ∀ (x : α), x ∈ s → ∀ (x_2 : α), x_2 ∈ t → x ≠ x_2 → r x_2 x
Theorem: List.append_cancel_left_eq
File: src/lean/Init/Data/List/BasicAux.lean

tactic: apply propext
state_before: α : Type u_1
as bs cs : List α
⊢ (as ++ bs = as ++ cs) = (bs = cs)

tactic: apply Iff.intro
state_before: case a
α : Type u_1
as bs cs : List α
⊢ as ++ bs = as ++ cs ↔ bs = cs

tactic: next => apply append_cancel_left
state_before: case a.mp
α : Type u_1
as bs cs : List α
⊢ as ++ bs = as ++ cs → bs = cs

case a.mpr
α : Type u_1
as bs cs : List α
⊢ bs = cs → as ++ bs = as ++ cs

tactic: next => intro h; simp [h]
state_before: case a.mpr
α : Type u_1
as bs cs : List α
⊢ bs = cs → as ++ bs = as ++ cs

tactic: apply append_cancel_left
state_before: α : Type u_1
as bs cs : List α
⊢ as ++ bs = as ++ cs → bs = cs

tactic: intro h
state_before: α : Type u_1
as bs cs : List α
⊢ bs = cs → as ++ bs = as ++ cs

tactic: simp [h]
state_before: α : Type u_1
as bs cs : List α
h : bs = cs
⊢ as ++ bs = as ++ cs
Theorem: Finpartition.parts_nonempty_iff
File: Mathlib/Order/Partition/Finpartition.lean

tactic: rw [nonempty_iff_ne_empty, not_iff_not, parts_eq_empty_iff]
state_before: α : Type u_1
inst✝¹ : Lattice α
inst✝ : OrderBot α
a : α
P : Finpartition a
⊢ Finset.Nonempty P.parts ↔ a ≠ ⊥
Theorem: TopologicalSpace.NoetherianSpace.isCompact
File: Mathlib/Topology/NoetherianSpace.lean

tactic: refine isCompact_iff_finite_subcover.2 fun U hUo hs => ?_
state_before: α : Type u_1
β : Type ?u.877
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
s : Set α
⊢ IsCompact s

tactic: rcases ((noetherianSpace_iff_opens α).mp ‹_› ⟨⋃ i, U i, isOpen_iUnion hUo⟩).elim_finite_subcover U
  hUo Set.Subset.rfl with ⟨t, ht⟩
state_before: α : Type u_1
β : Type ?u.877
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
s : Set α
ι✝ : Type u_1
U : ι✝ → Set α
hUo : ∀ (i : ι✝), IsOpen (U i)
hs : s ⊆ ⋃ (i : ι✝), U i
⊢ ∃ t, s ⊆ ⋃ (i : ι✝) (_ : i ∈ t), U i

tactic: exact ⟨t, hs.trans ht⟩
state_before: case intro
α : Type u_1
β : Type ?u.877
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
s : Set α
ι✝ : Type u_1
U : ι✝ → Set α
hUo : ∀ (i : ι✝), IsOpen (U i)
hs : s ⊆ ⋃ (i : ι✝), U i
t : Finset ι✝
ht : ↑{ carrier := ⋃ (i : ι✝), U i, is_open' := (_ : IsOpen (⋃ (i : ι✝), U i)) } ⊆ ⋃ (i : ι✝) (_ : i ∈ t), U i
⊢ ∃ t, s ⊆ ⋃ (i : ι✝) (_ : i ∈ t), U i
Theorem: FirstOrder.Language.Theory.CompleteType.setOf_subset_eq_univ_iff
File: Mathlib/ModelTheory/Types.lean

tactic: have h : { p : T.CompleteType α | S ⊆ ↑p } = ⋂₀ ((fun φ => { p | φ ∈ p }) '' S) := by
  ext
  simp [subset_def]
state_before: L : Language
T : Theory L
α : Type w
S : Theory (L[[α]])
⊢ {p | S ⊆ ↑p} = Set.univ ↔ ∀ (φ : Sentence (L[[α]])), φ ∈ S → LHom.onTheory (lhomWithConstants L α) T ⊨ᵇ φ

tactic: simp_rw [h, sInter_eq_univ, ← setOf_mem_eq_univ_iff]
state_before: L : Language
T : Theory L
α : Type w
S : Theory (L[[α]])
h : {p | S ⊆ ↑p} = ⋂₀ ((fun φ => {p | φ ∈ p}) '' S)
⊢ {p | S ⊆ ↑p} = Set.univ ↔ ∀ (φ : Sentence (L[[α]])), φ ∈ S → LHom.onTheory (lhomWithConstants L α) T ⊨ᵇ φ

tactic: refine' ⟨fun h φ φS => h _ ⟨_, φS, rfl⟩, _⟩
state_before: L : Language
T : Theory L
α : Type w
S : Theory (L[[α]])
h : {p | S ⊆ ↑p} = ⋂₀ ((fun φ => {p | φ ∈ p}) '' S)
⊢ (∀ (s : Set (CompleteType T α)), s ∈ (fun φ => {p | φ ∈ p}) '' S → s = Set.univ) ↔
    ∀ (φ : Sentence (L[[α]])), φ ∈ S → {p | φ ∈ p} = Set.univ

tactic: rintro h _ ⟨φ, h1, rfl⟩
state_before: L : Language
T : Theory L
α : Type w
S : Theory (L[[α]])
h : {p | S ⊆ ↑p} = ⋂₀ ((fun φ => {p | φ ∈ p}) '' S)
⊢ (∀ (φ : Sentence (L[[α]])), φ ∈ S → {p | φ ∈ p} = Set.univ) →
    ∀ (s : Set (CompleteType T α)), s ∈ (fun φ => {p | φ ∈ p}) '' S → s = Set.univ

tactic: exact h _ h1
state_before: case intro.intro
L : Language
T : Theory L
α : Type w
S : Theory (L[[α]])
h✝ : {p | S ⊆ ↑p} = ⋂₀ ((fun φ => {p | φ ∈ p}) '' S)
h : ∀ (φ : Sentence (L[[α]])), φ ∈ S → {p | φ ∈ p} = Set.univ
φ : Sentence (L[[α]])
h1 : φ ∈ S
⊢ (fun φ => {p | φ ∈ p}) φ = Set.univ

tactic: ext
state_before: L : Language
T : Theory L
α : Type w
S : Theory (L[[α]])
⊢ {p | S ⊆ ↑p} = ⋂₀ ((fun φ => {p | φ ∈ p}) '' S)

tactic: simp [subset_def]
state_before: case h
L : Language
T : Theory L
α : Type w
S : Theory (L[[α]])
x✝ : CompleteType T α
⊢ x✝ ∈ {p | S ⊆ ↑p} ↔ x✝ ∈ ⋂₀ ((fun φ => {p | φ ∈ p}) '' S)
Theorem: Equiv.forall_congr
File: Mathlib/Logic/Equiv/Defs.lean

tactic: constructor <;> intro h₂ x
state_before: α : Sort u
β : Sort v
γ : Sort w
p : α → Prop
q : β → Prop
f : α ≃ β
h : ∀ {x : α}, p x ↔ q (↑f x)
⊢ (∀ (x : α), p x) ↔ ∀ (y : β), q y

tactic: . rw [← f.right_inv x]; apply h.mp; apply h₂
state_before: case mp
α : Sort u
β : Sort v
γ : Sort w
p : α → Prop
q : β → Prop
f : α ≃ β
h : ∀ {x : α}, p x ↔ q (↑f x)
h₂ : ∀ (x : α), p x
x : β
⊢ q x

case mpr
α : Sort u
β : Sort v
γ : Sort w
p : α → Prop
q : β → Prop
f : α ≃ β
h : ∀ {x : α}, p x ↔ q (↑f x)
h₂ : ∀ (y : β), q y
x : α
⊢ p x

tactic: rw [← f.right_inv x]
state_before: case mp
α : Sort u
β : Sort v
γ : Sort w
p : α → Prop
q : β → Prop
f : α ≃ β
h : ∀ {x : α}, p x ↔ q (↑f x)
h₂ : ∀ (x : α), p x
x : β
⊢ q x

tactic: apply h.mp
state_before: case mp
α : Sort u
β : Sort v
γ : Sort w
p : α → Prop
q : β → Prop
f : α ≃ β
h : ∀ {x : α}, p x ↔ q (↑f x)
h₂ : ∀ (x : α), p x
x : β
⊢ q (toFun f (invFun f x))

tactic: apply h₂
state_before: case mp
α : Sort u
β : Sort v
γ : Sort w
p : α → Prop
q : β → Prop
f : α ≃ β
h : ∀ {x : α}, p x ↔ q (↑f x)
h₂ : ∀ (x : α), p x
x : β
⊢ p (invFun f x)

tactic: apply h.mpr
state_before: case mpr
α : Sort u
β : Sort v
γ : Sort w
p : α → Prop
q : β → Prop
f : α ≃ β
h : ∀ {x : α}, p x ↔ q (↑f x)
h₂ : ∀ (y : β), q y
x : α
⊢ p x

tactic: apply h₂
state_before: case mpr
α : Sort u
β : Sort v
γ : Sort w
p : α → Prop
q : β → Prop
f : α ≃ β
h : ∀ {x : α}, p x ↔ q (↑f x)
h₂ : ∀ (y : β), q y
x : α
⊢ q (↑f x)
Theorem: MeasureTheory.lintegral_rw₂
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: dsimp only
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type ?u.948646
m : MeasurableSpace α
μ ν : Measure α
f₁ f₁' : α → β
f₂ f₂' : α → γ
h₁✝ : f₁ =ᵐ[μ] f₁'
h₂✝ : f₂ =ᵐ[μ] f₂'
g : β → γ → ℝ≥0∞
x✝ : α
h₂ : f₂ x✝ = f₂' x✝
h₁ : f₁ x✝ = f₁' x✝
⊢ (fun a => g (f₁ a) (f₂ a)) x✝ = (fun a => g (f₁' a) (f₂' a)) x✝

tactic: rw [h₁, h₂]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type ?u.948646
m : MeasurableSpace α
μ ν : Measure α
f₁ f₁' : α → β
f₂ f₂' : α → γ
h₁✝ : f₁ =ᵐ[μ] f₁'
h₂✝ : f₂ =ᵐ[μ] f₂'
g : β → γ → ℝ≥0∞
x✝ : α
h₂ : f₂ x✝ = f₂' x✝
h₁ : f₁ x✝ = f₁' x✝
⊢ g (f₁ x✝) (f₂ x✝) = g (f₁' x✝) (f₂' x✝)