Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: don't export Trans.trans #6809

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Init/Data/List/Sublist.lean
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ theorem Sublist.getLast_mem (s : ys <+ xs) (h) : ys.getLast h ∈ xs :=
s.mem (List.getLast_mem h)

instance : Trans (@Sublist α) Subset Subset :=
⟨fun h₁ h₂ => trans h₁.subset h₂⟩
⟨fun h₁ h₂ => Trans.trans h₁.subset h₂⟩

instance : Trans Subset (@Sublist α) Subset :=
⟨fun h₁ h₂ => trans h₁ h₂.subset⟩
⟨fun h₁ h₂ => Trans.trans h₁ h₂.subset⟩

instance : Trans (fun l₁ l₂ => Sublist l₂ l₁) (Membership.mem : List α → α → Prop) Membership.mem :=
⟨fun h₁ h₂ => h₁.subset h₂⟩
Expand Down
2 changes: 0 additions & 2 deletions src/Init/Prelude.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1173,8 +1173,6 @@ class Trans (r : α → β → Sort u) (s : β → γ → Sort v) (t : outParam
/-- Compose two proofs by transitivity, generalized over the relations involved. -/
trans : r a b → s b c → t a c

export Trans (trans)

instance (r : α → γ → Sort u) : Trans Eq r r where
trans heq h' := heq ▸ h'

Expand Down
4 changes: 2 additions & 2 deletions tests/lean/run/trans.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ instance : Trans (α := Int) (β := Int) (γ := Int) (.≤.) (.≤.) (.≤.) whe
trans := sorry

theorem ex1 {a b c d : Nat} (h1 : a ≤ b) (h2 : b ≤ c) (h3 : c ≤ d) : a ≤ d :=
trans h1 <| trans h2 h3
Trans.trans h1 <| Trans.trans h2 h3

theorem ex2 {a b c d : Int} (h1 : a ≤ b) (h2 : b ≤ c) (h3 : c ≤ d) : a ≤ d :=
trans h1 <| trans h2 h3
Trans.trans h1 <| Trans.trans h2 h3
Loading