Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: long overdue delaborators (#7633)
This brings to Mathlib assorted delaborators written by @kmill for various projects including Mathematics in Lean. They mostly fix regressions compared to Lean 3. Co-authored-by: Mario Carneiro <mcarneir@andrew.cmu.edu>
- Loading branch information
1 parent
11add7f
commit 0166642
Showing
6 changed files
with
349 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
import Std.Tactic.GuardMsgs | ||
import Mathlib.Util.PiNotation | ||
import Mathlib.Data.Set.Lattice | ||
|
||
section PiNotation | ||
variable (P : Nat → Prop) (α : Nat → Type) (s : Set ℕ) | ||
|
||
/-- info: ∀ x > 0, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x, x > 0 → P x | ||
|
||
/-- info: ∀ x > 0, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x > 0, P x | ||
|
||
/-- info: ∀ x ≥ 0, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x, x ≥ 0 → P x | ||
|
||
/-- info: ∀ x ≥ 0, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x ≥ 0, P x | ||
|
||
/-- info: ∀ x < 0, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x < 0, P x | ||
|
||
/-- info: ∀ x < 0, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x, x < 0 → P x | ||
|
||
/-- info: ∀ x ≤ 0, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x ≤ 0, P x | ||
|
||
/-- info: ∀ x ≤ 0, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x, x ≤ 0 → P x | ||
|
||
/-- info: ∀ x ∈ s, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x ∈ s, P x | ||
|
||
/-- info: ∀ x ∈ s, P x : Prop -/ | ||
#guard_msgs in | ||
#check ∀ x, x ∈ s → P x | ||
|
||
/-- info: (x : ℕ) → α x : Type -/ | ||
#guard_msgs in | ||
#check (x : Nat) → α x | ||
|
||
open PiNotation | ||
|
||
/-- info: Π (x : ℕ), α x : Type -/ | ||
#guard_msgs in | ||
#check (x : Nat) → α x | ||
|
||
/-- info: ∀ (x : ℕ), P x : Prop -/ | ||
#guard_msgs in | ||
#check (x : Nat) → P x | ||
|
||
end PiNotation | ||
|
||
section UnionInter | ||
variable (s : ℕ → Set ℕ) (u : Set ℕ) (p : ℕ → Prop) | ||
|
||
/-- info: ⋃ n ∈ u, s n : Set ℕ -/ | ||
#guard_msgs in | ||
#check ⋃ n ∈ u, s n | ||
|
||
/-- info: ⋂ n ∈ u, s n : Set ℕ -/ | ||
#guard_msgs in | ||
#check ⋂ n ∈ u, s n | ||
|
||
end UnionInter | ||
|
||
section CompleteLattice | ||
/-- info: ⨆ i ∈ Set.univ, (i = i) : Prop -/ | ||
#guard_msgs in | ||
#check ⨆ (i : Nat) (_ : i ∈ Set.univ), (i = i) | ||
|
||
/-- info: ⨅ i ∈ Set.univ, (i = i) : Prop -/ | ||
#guard_msgs in | ||
#check ⨅ (i : Nat) (_ : i ∈ Set.univ), (i = i) | ||
|
||
end CompleteLattice | ||
|
||
section existential | ||
|
||
/-- info: ∃ i ≥ 3, i = i : Prop -/ | ||
#guard_msgs in | ||
#check ∃ (i : Nat), i ≥ 3 ∧ i = i | ||
|
||
/-- info: ∃ i > 3, i = i : Prop -/ | ||
#guard_msgs in | ||
#check ∃ (i : Nat), i > 3 ∧ i = i | ||
|
||
/-- info: ∃ i ≤ 3, i = i : Prop -/ | ||
#guard_msgs in | ||
#check ∃ (i : Nat), i ≤ 3 ∧ i = i | ||
|
||
/-- info: ∃ i < 3, i = i : Prop -/ | ||
#guard_msgs in | ||
#check ∃ (i : Nat), i < 3 ∧ i = i | ||
|
||
end existential | ||
|
||
section prod | ||
|
||
variable (x : ℕ × ℕ) | ||
|
||
/-- info: x.1 : ℕ -/ | ||
#guard_msgs in | ||
#check x.1 | ||
|
||
variable (p : (ℕ → ℕ) × (ℕ → ℕ)) | ||
|
||
/-- info: p.1 22 : ℕ -/ | ||
#guard_msgs in | ||
#check p.1 22 | ||
|
||
end prod |
Oops, something went wrong.