Skip to content

Instantly share code, notes, and snippets.

@ikedaisuke
Created November 7, 2011 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikedaisuke/1344224 to your computer and use it in GitHub Desktop.
Save ikedaisuke/1344224 to your computer and use it in GitHub Desktop.
Thierry's proof of the principle of infinite descent (a part) in Agda1/Alfa
noether (A::Set)(R::rel A) :: Type
= (P::pred A) -> ((x::A) -> ((y::A) -> R y x -> P y) -> P x) -> (x::A) -> P x
infiniteDescent (A::Set)
(R::rel A)
(P::pred A)
:: noether A R ->
((x::A) -> P x -> exists A (\(x1::A) -> and (R x1 x) (P x1))) ->
(x::A) -> not (P x)
= \ (h1::noether A R) ->
\ (h2::(x::A) -> P x -> exists A (\(x1::A) -> and (R x1 x) (P x1))) ->
\ (x::A) ->
h1 (\(y::A) -> not (P y))
(\(z::A) ->
\(h3::(y::A) -> (x'::R y z) -> not (P y)) ->
\(h4::P z) ->
existsElim A (\(x1::A) -> and (R x1 z) (P x1)) N0 (h2 z h4)
(\(y::A) ->
\(h5::and (R y z) (P y)) ->
h3 y (andElimLeft (R y z) (P y) h5) (andElimRight (R y z) (P y) h5)))
x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment