{-# OPTIONS --cubical-compatible #-}
module Padova2025.ComputationalContent.Fictions.Minima (β₯ : Set) where
Minima
open import Padova2025.ProgrammingBasics.Naturals.Base open import Padova2025.ProvingBasics.Termination.Ordering open import Padova2025.ProvingBasics.Termination.WellFounded.Base open import Padova2025.ProvingBasics.Connectives.Disjunction open import Padova2025.ProvingBasics.Connectives.Existential open import Padova2025.ProvingBasics.Connectives.Conjunction open import Padova2025.ComputationalContent.DoubleNegation (β₯)
Minima of functions up to double negation
go : (Ξ± : β β β) β (i : β) β Acc _<'_ (Ξ± i) β Β¬ Β¬ (Ξ£[ i β β ] ((j : β) β Β¬ Β¬ Ξ± i β€ Ξ± j))
go Ξ± i (acc f) = oracle {Ξ£[ j β β ] Ξ± j < Ξ± i} β«= Ξ»
{ (left (j , p)) β {!!}
; (right q) β {!!}
}
where
h : Β¬ (Ξ£[ j β β ] Ξ± j < Ξ± i) β (j : β) β Β¬ Β¬ (Ξ± i β€ Ξ± j)
h q j with β€-<-connex (Ξ± i) (Ξ± j)
... | left Ξ±iβ€Ξ±j = {!!}
... | right Ξ±j<Ξ±i = {!!}
minimum : (Ξ± : β β β) β Β¬ Β¬ (Ξ£[ i β β ] ((j : β) β Β¬ Β¬ Ξ± i β€ Ξ± j))
minimum = {!!}
Variant for inhabited sets of natural numbers
go' : (P : β β Set) (n : β) β P n β Acc _<'_ n β Β¬ Β¬ (β[ a ] P a Γ ((b : β) β b < a β P b β β₯))
go' = {!!}
minimum' : (P : β β Set) β (β[ n ] P n) β Β¬ Β¬ (β[ a ] P a Γ ((b : β) β b < a β P b β β₯))
minimum' = {!!}
A largest natural number?
Carefully ponder the following code claiming to show, up to double negation, the existence of a largest natural number. How does it try to work, and why does Agda reject it?
largest-number : Β¬ Β¬ (Ξ£[ a β β ] ((b : β) β Β¬ Β¬ a β₯ b))
largest-number = f zero
where
f : β β Β¬ Β¬ (Ξ£[ a β β ] ((b : β) β Β¬ Β¬ a β₯ b))
f a k = k (a , h)
where
h : (b : β) β Β¬ Β¬ a β₯ b
h b with β€-<-connex b a
... | left bβ€a = return mβ€n
... | right a<b = Ξ» k' β f b k
lemma : {x : β} β succ x β€ x β β₯
lemma = {!!}
no-largest-number : Β¬ (Β¬ Β¬ (β[ a ] ((b : β) β Β¬ Β¬ b β€ a)))
no-largest-number = {!!}