open import Graded.Modality
open import Definition.Typed.Restrictions
module Graded.FullReduction.Assumptions
{a} {M : Set a}
(π : Modality M)
(R : Type-restrictions M)
where
open Modality π
open Type-restrictions R
open import Graded.Modality.Properties π
open import Graded.Mode π
open import Tools.Bool
open import Tools.Function
open import Tools.Product
open import Tools.PropositionalEquality
import Tools.Reasoning.PartialOrder
open import Tools.Sum as β
private variable
p q r : M
record Full-reduction-assumptions : Set a where
no-eta-equality
field
πβ€π : Unit-allowed β π β€ π
β‘πβπβ€π : Ξ£β-allowed p q β p β‘ π β p β‘ π Γ T πα΅-allowed Γ π β€ π
record Full-reduction-assumptionsβ² : Set a where
no-eta-equality
field
β€π : Unit-allowed β p β€ π
Β·-increasing : Ξ£β-allowed p q β r β€ p Β· r
βββ‘πα΅ββ€π : Ξ£β-allowed p q β β p β β‘ πα΅ β p β€ π
Full-reduction-assumptionsβFull-reduction-assumptionsβ² :
Full-reduction-assumptions β Full-reduction-assumptionsβ²
Full-reduction-assumptionsβFull-reduction-assumptionsβ² =
(Ξ» as β record
{ β€π = Ξ» {p = p} β
Unit-allowed ββ¨ πβ€π as β©
π β€ π ββ¨ (Ξ» πβ€π β begin
p β‘Λβ¨ Β·-identityΛ‘ _ β©
π Β· p β€β¨ Β·-monotoneΛ‘ πβ€π β©
π Β· p β‘β¨ Β·-zeroΛ‘ _ β©
π β) β©
p β€ π β‘
; Β·-increasing = Ξ» {p = p} {q = q} {r = r} β
Ξ£β-allowed p q ββ¨ β‘πβπβ€π as β©
p β‘ π β p β‘ π Γ T πα΅-allowed Γ π β€ π ββ¨ (Ξ» { (injβ refl) β begin
r β‘Λβ¨ Β·-identityΛ‘ _ β©
π Β· r β
; (injβ (refl , _ , πβ€π)) β begin
r β‘Λβ¨ Β·-identityΛ‘ _ β©
π Β· r β€β¨ Β·-monotoneΛ‘ πβ€π β©
π Β· r β
}) β©
r β€ p Β· r β‘
; βββ‘πα΅ββ€π = Ξ» {p = p} {q = q} β
Ξ£β-allowed p q ββ¨ β‘πβπβ€π as β©
p β‘ π β p β‘ π Γ T πα΅-allowed Γ π β€ π ββ¨ β.map β€-reflexive (Ξ» (pβ‘π , ok , _) β (ok , pβ‘π)) β©
p β€ π β T πα΅-allowed Γ p β‘ π ββ¨ βββ‘πβββπα΅Γβ‘π .projβ β©
(β p β β‘ πα΅ β p β€ π) β‘
})
, (Ξ» as β record
{ πβ€π = β€π as
; β‘πβπβ€π = Ξ» {p = p} {q = q} β
Ξ£β-allowed p q ββ¨ (Ξ» ok β Β·-increasing as ok , βββ‘πα΅ββ€π as ok) β©
π β€ p Β· π Γ (β p β β‘ πα΅ β p β€ π) ββ¨ (Ξ» (πβ€p1 , βββ‘πα΅ββ€π) β
subst (_ β€_) (Β·-identityΚ³ _) πβ€p1
, βββ‘πβββπα΅Γβ‘π .projβ βββ‘πα΅ββ€π) β©
π β€ p Γ (p β€ π β T πα΅-allowed Γ p β‘ π) ββ¨ (Ξ» where
(πβ€p , injβ pβ€π) β injβ (β€-antisym pβ€π πβ€p)
(πβ€π , injβ (ok , refl)) β injβ (refl , ok , πβ€π)) β©
p β‘ π β p β‘ π Γ T πα΅-allowed Γ π β€ π β‘
})
where
open Full-reduction-assumptions
open Full-reduction-assumptionsβ²
open Tools.Reasoning.PartialOrder β€-poset