The half-integers
Content created by Fredrik Bakke, Jonathan Prieto-Cubides and Egbert Rijke.
Created on 2022-07-28.
Last modified on 2023-09-10.
module elementary-number-theory.half-integers where
Imports
open import elementary-number-theory.addition-integers open import elementary-number-theory.integers open import foundation.coproduct-types open import foundation.universe-levels
Idea
The half-integers are the numbers of the form x + ½
, where x : ℤ
.
Definition
The half-integers
ℤ+½ : UU lzero ℤ+½ = ℤ
The disjoint union of the half-integers with the integers
½ℤ : UU lzero ½ℤ = ℤ+½ + ℤ
The zero element of ½ℤ
zero-½ℤ : ½ℤ zero-½ℤ = inr zero-ℤ
Addition on ½ℤ
add-½ℤ : ½ℤ → ½ℤ → ½ℤ add-½ℤ (inl x) (inl y) = inr (succ-ℤ (x +ℤ y)) add-½ℤ (inl x) (inr y) = inl (x +ℤ y) add-½ℤ (inr x) (inl y) = inl (x +ℤ y) add-½ℤ (inr x) (inr y) = inr (x +ℤ y) infixl 35 _+½ℤ_ _+½ℤ_ = add-½ℤ
Recent changes
- 2023-09-10. Fredrik Bakke. Define precedence levels and associativities for all binary operators (#712).
- 2023-05-13. Fredrik Bakke. Refactor to use infix binary operators for arithmetic (#620).
- 2023-03-10. Fredrik Bakke. Additions to
fix-import
(#497). - 2023-03-07. Fredrik Bakke. Add blank lines between
<details>
tags and markdown syntax (#490). - 2023-03-07. Jonathan Prieto-Cubides. Show module declarations (#488).