Natural Order definition utilizing an identity type#215
Conversation
934b2c3 to
081e84b
Compare
|
corrected a small mistake in the preamble, as well as adding to the index file if this is suitable |
martinescardo
left a comment
There was a problem hiding this comment.
Thanks for your contribution. I am sorry for the delay. I had forgotten about this.
One more thing: although many parts of TypeTopology use zero, I favour using 0 nowadays, so if you adopt this, it would be great.
| as I wanted to tailor the most fundamental lemmas to the character of this | ||
| type, and also to make certain operations more ergonomic and reduce the | ||
| character count of proofs. Notably, 'equal-gives-less-than-or-equal' is | ||
| simply '≼-=' here. |
There was a problem hiding this comment.
Could you rename ≼-= to `≼-gives-=' please?
| ≼-is-discrete : (x y : ℕ) → is-discrete (x ≼ y) | ||
| ≼-is-discrete x y = props-are-discrete (≼-is-prop-valued x y) | ||
|
|
||
| ≼-is-set : (x y : ℕ) → is-set (x ≼ y) |
There was a problem hiding this comment.
I am not sure why you are proving ≼-is-discrete and ≼-is-set. For the latter you could use props-are-sets. Do you really need this? I would suggest to delete both.
| ≼-transport₂ : {x y z w : ℕ} → x = z → y = w → x ≼ y → z ≼ w | ||
| ≼-transport₂ p q i = transport₂ (_≼ℕ_) p q i | ||
|
|
||
| ≼-= : (x y : ℕ) → x = y → x ≼ y |
There was a problem hiding this comment.
Please rename this to =-gives-≼ y.
| succ-order-injective : (x y : ℕ) → succ x ≼ succ y → x ≼ y | ||
| succ-order-injective x y = succ-lc | ||
|
|
||
| ¬≼-succ-lc : (x y : ℕ) → ¬ (succ x ≼ succ y) → ¬ (x ≼ y) |
There was a problem hiding this comment.
I would omit the definition in line 186. It is just the contrapositive of the previous one, and we have a definition of contrapositivity in MLTT.Negation.
| import Naturals.Binary | ||
| import Naturals.Division | ||
| import Naturals.Exponentiation | ||
| import Naturals.IdOrder |
There was a problem hiding this comment.
Please use alphabetical order in the index imports.
|
I will be implementing these changes after I finish my work for the Modular Group. I've been thoughtful about this module more generally and how I want to structure it. First I was considering the question of under what general conditions it is possible to construct a type equivalence like this, and it seems directly related to the fundamental theorem of identity types, so I'm giving some thought of how to explore that theme in this module. |
@lane-core I’ve converted this to a draft PR since you mentioned that you will be addressing the review after PR #214 is completed. |
|
@ayberkt @martinescardo to update here, a simpler presentation of this idea would use the identity type formed by |
|
Is there any intention to continue with this? |
|
@martinescardo I will revisit this one in more depth after the Modular Group PR, as I want to give this idea some reconsideration in light of what I've learned since making the original request. For now I can accommodate your requested changes and get it off the TT PR stack, and submit a new PR when I decide to revise. |
Quoting from the preamble: