Skip to content

Commit

Permalink
lint(order/lexographic, pilex): docstrings (#4489)
Browse files Browse the repository at this point in the history
Docstrings in `order/lexographic` and `order/pilex`
  • Loading branch information
awainverse committed Oct 7, 2020
1 parent afffab1 commit 2e77ef6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/order/lexicographic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import tactic.basic

universes u v

/-- The cartesian product, equipped with the lexicographic order. -/
def lex (α : Type u) (β : Type v) := α × β

variables {α : Type u} {β : Type v}
Expand Down
3 changes: 3 additions & 0 deletions src/order/pilex.lean
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ import algebra.order_functions
variables {ι : Type*} {β : ι → Type*} (r : ι → ι → Prop)
(s : Π {i}, β i → β i → Prop)

/-- The lexicographic relation on `Π i : ι, β i`, where `ι` is ordered by `r`,
and each `β i` is ordered by `s`. -/
def pi.lex (x y : Π i, β i) : Prop :=
∃ i, (∀ j, r j i → x j = y j) ∧ s (x i) (y i)

/-- The cartesian product of an indexed family, equipped with the lexicographic order. -/
def pilex (α : Type*) (β : α → Type*) : Type* := Π a, β a

instance [has_lt ι] [∀ a, has_lt (β a)] : has_lt (pilex ι β) :=
Expand Down

0 comments on commit 2e77ef6

Please sign in to comment.