Package natural-order-min-max: Natural number min and max functions
Information
name | natural-order-min-max |
version | 1.14 |
description | Natural number min and max functions |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
requires | bool natural-order-thm |
show | Data.Bool Number.Natural |
Files
- Package tarball natural-order-min-max-1.14.tgz
- Theory file natural-order-min-max.thy (included in the package tarball)
Defined Constants
- Number
- Natural
- max
- min
- minimal
- Natural
Theorems
⊦ ∀n. max 0 n = n
⊦ ∀n. max n 0 = n
⊦ ∀n. max n n = n
⊦ ∀n. min 0 n = 0
⊦ ∀n. min n 0 = 0
⊦ ∀n. min n n = n
⊦ ∀m n. m ≤ max m n
⊦ ∀m n. n ≤ max m n
⊦ ∀m n. min m n ≤ m
⊦ ∀m n. min m n ≤ n
⊦ ∀m n. max m n = max n m
⊦ ∀m n. min m n = min n m
⊦ ∀m n. max m n = if m ≤ n then n else m
⊦ ∀m n. min m n = if m ≤ n then m else n
⊦ ∀P. (∃n. P n) ⇔ P ((minimal) P) ∧ ∀m. m < (minimal) P ⇒ ¬P m
Input Type Operators
- →
- bool
- Number
- Natural
- natural
- Natural
Input Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- cond
- F
- T
- Bool
- Number
- Natural
- <
- ≤
- zero
- Natural
Assumptions
⊦ T
⊦ ∀n. 0 ≤ n
⊦ ∀n. n ≤ n
⊦ F ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ F
⊦ (∃) = λP. P ((select) P)
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λp. p = λx. T
⊦ ∀t. T ∧ t ⇔ t
⊦ ∀t. F ⇒ t ⇔ T
⊦ ∀t. F ∨ t ⇔ t
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t1 t2. (if T then t1 else t2) = t1
⊦ ∀m n. m ≤ n ∨ n ≤ m
⊦ (∧) = λp q. (λf. f p q) = λf. f T T
⊦ ∀m n. m ≤ n ∧ n ≤ m ⇔ m = n
⊦ ∀P. (∃n. P n) ⇔ ∃n. P n ∧ ∀m. m < n ⇒ ¬P m
⊦ ∀P c x y. P (if c then x else y) ⇔ (c ⇒ P x) ∧ (¬c ⇒ P y)