Fundamental theorem of Galois theory: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Anita5192
m →‎Proof: Fixed Character link.
en>D.Lazard
Reverted 2 edits by Maimonid (talk): Rm per WP:ELNO: either personal web pages or WP:OR or not about the topic (about Galois theory in general). (TW)
Line 1: Line 1:
{{Type systems}}
I'm Penni and I live in a seaside city in northern Germany, Stade. I'm 39 and I'm will soon finish my study at Integrated International Studies.<br><br>my weblog :: [http://www.Liteea.com/management.php?itemid=701& how to get free fifa 15 coins]
In [[computer science]] and [[logic]], a '''dependent type''' is a type that depends on a value. It is an overlapping of feature of math-encoding [[type theory]] and bug-stopping [[type system]]s.  In [[intuitionistic type theory]], dependent types are used to encode logic's [[Generalized quantifier|quantifiers]] like "for all" and "there exists". In [[functional programming languages]] like [[ATS (programming language)|ATS]], [[Agda (theorem prover)|Agda]] and [[Epigram (programming language)|Epigram]], dependent types prevent bugs by allowing very expressive types.
 
Two common examples of dependent types are dependent functions and dependent pairs.  A dependent function's return type may depend on the ''value'' (not just type) of an argument.  A function that takes a positive integer "n" may return an array of length "n".  (Note that this is different from [[Polymorphism (computer science)|polymorphism]] where the type is an argument.)  A dependent pair may have a second value that depends on the first.  It can be used to encode a pair of integers where the second one is greater than the first.
 
Dependent types add complexity to a type system.  Deciding the equality of dependent types in a program may require computations. If arbitrary values are allowed in dependent types, then deciding type equality may involve deciding whether two arbitrary programs produce the same result; hence [[type checking]] may become [[Undecidable problem|undecidable]].
 
==History==
 
Dependent types were created to deepen the connection between programming and logic.
 
In 1934, [[Haskell Curry]] noticed that the types used in mathematic programming languages followed the same pattern as axioms in [[Propositional calculus|propositional logic]].  Going further, for every proof in the logic, there was a matching function (term) in the programming language.  One of Curry's examples was the correspondence between [[simply typed lambda calculus]] and [[intuitionistic logic]].<ref name=curry_howard>{{cite journal|last=Sørensen|first=Morten Heine B.|coauthors=Pawel Urzyczyn|title=Lectures on the Curry-Howard Isomorphism|year=1998|url=http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.17.7385}}</ref>
 
[[Predicate logic]] is an extension of propositional logic, adding quantifiers. Howard and de Bruijn extended lambda calculus to match this more powerful logic by creating types for dependent functions, which correspond to "for all", and dependent pairs, which correspond to "there exists".<ref name=dep_types_at_work>{{cite journal|last=Bove|first=Ana|coauthors=Peter Dybjer|title=Dependent Types at Work|year=2008|url=http://www.cse.chalmers.se/~peterd/papers/DependentTypesAtWork.pdf}}</ref>
 
(Because of this and other work by Howard, propositions-as-types is known as the [[Curry-Howard correspondence]].)
 
 
==Formal definition==
 
Dependent types can be, very loosely speaking, imagined to be similar to the type of an indexed family of sets. More formally, given a type <math>A:\mathcal{U}</math> in a universe of types <math>\mathcal{U}</math>, one may have a '''family of types''' <math>B:A\to\mathcal{U}</math> which assigns to each term <math>a:A</math> a type <math>B(a):\mathcal{U}</math>. A function whose codomain varies depending on its argument is a '''dependent function''', and the type of this function is called a '''dependent type''', '''dependent product type''' or '''pi-type'''.  For this example, the dependent type would be written as
:<math>\Pi_{(x:A)}B(x)</math>
or as
:<math>\Pi (x:A),B(x)</math>
If ''B'' is a constant, the dependent type becomes an ordinary function <math>A\to B</math>. That is, <math>\Pi_{(x:A)}B</math> is judgementally equal to the [[function type]] <math>A\to B</math>.
 
The name 'pi-type' comes from the idea that these may be viewed as a [[Cartesian product]] of types. Pi-types can also be understood as [[model theory|models]] of [[Universal quantification#As adjoint|universal quantifiers]].
 
For example, writing <math>\mbox{Vec}({\mathbb R},n)</math> for <math>n</math>-tuples of [[real numbers]], then <math>\Pi_{(n:{\mathbb N})} \mbox{Vec}({\mathbb R},n)</math> would be the type of functions which, given a [[natural number]] ''n'', return a tuple of real numbers of size ''n''. The usual function space arises as a special case when the range type does not actually depend on the input, ''e.g.'' <math>\Pi_{(n:{\mathbb N})}\; {\mathbb R}</math> is the type of functions from natural numbers to the real numbers, which is written as <math>{\mathbb N}\to{\mathbb R}</math> in the simply typed lambda calculus.
 
[[Polymorphism (computer science)|Polymorphic functions]] are an important example of dependent functions, that is, functions having dependent type. Given a type, these functions act on elements of that type (or on elements of a type constructed (derived, inherited) from that type).  A polymorphic function returning elements of type ''C'' would have a polymorphic type written as
:<math>\Pi_{(A:\mathcal{U})} A\to C</math>
 
==Dependent pair type==
The [[Dual (category theory)|opposite]] of the dependent type is the '''dependent pair type''', '''dependent sum type''' or '''sigma-type'''.  It is analogous to the [[coproduct]] or [[disjoint union]]. Sigma-types can also be understood as models of [[Universal quantification#As adjoint|existential quantifiers]]. Notationally, it is written as
:<math>\Sigma_{(x:A)} B(x)</math>
The dependent pair type captures the idea of a pair, where the type of the second term is dependent on the first. Thus, if
:<math>(a,b):\Sigma_{(x:A)} B(x)</math>
then <math>a:A</math> and <math>b:B(a)</math>.  If ''B'' is a constant, then the dependent pair type becomes (is judgementally equal to) the [[product type]], that is, an ordinary Cartesian product <math>A\times B</math>.
 
==Systems of the lambda cube==
[[Henk Barendregt]] developed the [[lambda cube]] as a means of classifying type systems along three axes.  The eight corners of the resulting cube-shaped diagram each correspond to a type system, with [[simply typed lambda calculus]] in the least expressive corner, and [[calculus of constructions]] in the most expressive.  The three axes of the cube correspond to three different augmentations of the simply typed lambda calculus: the addition of dependent types, the addition of polymorphism, and the addition of higher [[kind (type theory)|kinded]] type constructors (functions from types to types, for example).  The lambda cube is generalized further by [[pure type system]]s.
 
===First order dependent type theory===
The system <math>\lambda \Pi</math> of pure first order dependent types, corresponding to the logical framework [[LF (logical framework)|LF]], is obtained by generalising the function space type of the [[simply typed lambda calculus]] to the dependent product type.
 
===Second order dependent type theory===
The system <math>\lambda \Pi 2</math> of second order dependent types is obtained from <math>\lambda \Pi</math> by allowing quantification over type constructors. In this theory the dependent product operator subsumes both the <math>\to</math> operator of simply typed lambda calculus and the <math>\forall</math> binder of [[System F]].
 
===Higher order dependently typed polymorphic lambda calculus===
The higher order system <math>\lambda \Pi \omega</math> extends <math>\lambda \Pi 2</math> to all four forms of abstraction from the [[lambda cube]]: functions from terms to terms, types to types, terms to types and types to terms. The system corresponds to the [[Calculus of constructions]] whose derivative, the [[calculus of inductive constructions]] is the underlying system of [[Coq|the Coq proof assistant]].
 
== Simultaneous Programming language and Logic ==
 
The [[Curry–Howard correspondence]] implies that types can be constructed that express arbitrarily complex mathematical properties.  If the user can supply a [[constructive proof]] that a type is ''inhabited'' (i.e., that a value of that type exists) then a compiler can check the proof and convert it into executable computer code that computes the value by carrying out the construction.  The proof checking feature makes dependently typed languages closely related to [[proof assistant]]s.  The code-generation aspect provides a powerful approach to formal [[program verification]] and [[proof-carrying code]], since the code is derived directly from a mechanically verified mathematical proof.
 
== Comparison of languages with dependent types ==
{{see also|Proof assistant#Comparison}}
{| class="wikitable sortable"
|-
! Language !! Actively developed !! Paradigm{{#tag:ref|This refers to the ''core'' language, not to any tactic or code generation sublanguage.|group=fn}} !! [[Tactic (proof assistant)|Tactics]] !! [[Proof term]]s !! [[Termination checking]] !! Types can depend on{{#tag:ref|Subject to semantic constraints, such as universe constraints|group=fn}} !! [[Universe (mathematics)|Universes]] !! [[Proof irrelevance]] !! [[Program extraction]] !! Extraction erases irrelevant terms
|-
| [[Agda (theorem prover)|Agda]] || {{yes}}<ref>{{cite web|url=http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.Download|title=Agda download page}}</ref> || [[Purely functional]] || Few/limited{{#tag:ref|Ring solver<ref>{{cite web|url=http://www.cs.nott.ac.uk/~nad/listings/lib/Algebra.RingSolver.html|title=Agda Ring Solver}}</ref>|group=fn}} || {{yes}} || {{yes|Yes (optional)}} || Any term || {{yes|Yes (optional){{#tag:ref|Optional universes, optional universe polymorphism, and optional explicitly specified universes|group=fn}}}} || Proof-irrelevant arguments (experimental)<ref name='agda-2.2.8'>{{cite web|url=http://permalink.gmane.org/gmane.comp.lang.agda/2051|title=Announce: Agda 2.2.8}}</ref> || {{yes|[[Haskell (programming language)|Haskell]], Javascript}} || {{yes}}<ref name='agda-2.2.8'/>
|-
| [[ATS (programming language)|ATS]] || {{yes}}<ref>{{cite web|url=http://www.ats-lang.org/CHANGELOG/changelog.html|title=ATS Changelog}}</ref> || Functional / imperative || {{no}}<ref>{{cite web|url=http://sourceforge.net/mailarchive/message.php?msg_id=27050673|title=email from ATS inventor Hongwei Xi}}</ref> || {{yes}} || {{yes}} || {{dunno}} || {{dunno}} || {{dunno}} || {{yes}} || {{dunno}}
|-
| [[Cayenne (programming language)|Cayenne]] || {{no}} || Purely functional || {{no}} || {{yes}} || {{no}} || Any term || {{no}} || {{no}} || {{dunno}} || {{dunno}}
|-
| [[Coq]] || {{yes}}<ref>{{cite web|url=https://gforge.inria.fr/scm/viewvc.php/trunk/CHANGES?root=coq&view=log|title=Coq CHANGES in Subversion repository}}</ref> || Purely functional || {{yes}} || {{yes}} || {{yes}} || Any term || {{yes|Yes{{#tag:ref|Universes, automatically inferred universe constraints (not the same as Agda's universe polymorphism) and optional explicit printing of universe constraints|group=fn}}}} || {{no}} || {{yes|Haskell, [[Scheme (programming language)|Scheme]] and [[OCaml]]}} || {{yes}}
|-
| [[Dependent ML]] || {{no|No{{#tag:ref|Has been superseded by ATS|group=fn}}}} || {{dunno}} || {{dunno}} || {{yes}} || {{dunno}} || Natural numbers || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}}
|-
| [http://code.google.com/p/guru-lang/ Guru] || {{no}}<ref>{{cite web|url=https://code.google.com/p/guru-lang/source/list|title=Guru SVN}}</ref> || Purely functional<ref name='guru-book'>{{cite web|url=http://guru-lang.googlecode.com/svn/branches/1.0/doc/book.pdf|title=Verified Programming in Guru|author=Aaron Stump|date=6 April 2009|accessdate=28 September 2010}}</ref> || {{yes|hypjoin}}<ref name='hypjoin-paper'>{{cite web|url=http://www.cs.uiowa.edu/~astump/papers/petcher-thesis.pdf|title=Deciding Joinability Modulo Ground Equations in Operational Type Theory|author=Adam Petcher|date=1 April 2008|accessdate=14 October 2010}}</ref> || {{yes}}<ref name='guru-book'/> || {{yes}} || Any term || {{no}} || {{yes}} || {{yes|Carraway}} || {{yes}}
|-
| [[Idris (programming language)|Idris]] || {{yes}}<ref>{{cite web|url=http://github.com/edwinb/Idris|title=Idris git repository}}</ref> || Purely functional<ref>{{cite web|url=http://www.cs.st-andrews.ac.uk/~eb/drafts/ifl08.pdf|title=Idris, a language with dependent types - extended abstract}}</ref> || {{yes}}<ref name='idris-compare'>{{cite web|url=http://www.quora.com/How-does-Idris-compare-to-other-dependently-typed-programming-languages|title=How does Idris compare to other dependently-typed programming languages?|author=Edwin Brady}}</ref> || {{yes}} || {{yes|Yes (optional)}} || Any term || {{yes}} || {{no}} || {{yes}} || {{yes|Yes, aggressively}}<ref name='idris-compare'/>
|-
| [[Matita]] || {{yes}}<ref>{{cite web|url=http://helm.cs.unibo.it/websvn/listing.php?repname=helm&path=%2F&sc=0|title=Matita SVN}}</ref> || Purely functional || {{yes}} || {{yes}} || {{yes}} || Any term || {{yes}} || {{dunno}} || {{yes|[[OCaml]]}} || {{yes}}
|-
| [[NuPRL]] || {{yes}} || Purely functional || {{yes}} || {{yes}} || {{yes}} || Any term || {{yes}} || {{dunno}} || {{yes}} || {{dunno}}
|-
| [[F* (programming language)|F*]] || {{yes}} || Functional /imperative || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}}
|-
| [[Prototype Verification System|PVS]] || {{yes}} || {{dunno}} || {{yes}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}}
|-
| [http://sage.soe.ucsc.edu/ Sage] || {{dunno}} || Hybrid typechecking || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}}
|-
| [[Twelf]] || {{yes}} || [[Logic programming]] || {{dunno}} || {{yes}} || {{yes|Yes (optional)}} || Any (LF) term || {{no}} || {{no}} || {{dunno}} || {{dunno}}
|-
| [http://www.cs.bu.edu/~hwxi/Xanadu/Xanadu.html Xanadu] || {{no}}<ref>{{cite web|url=http://www.cs.bu.edu/~hwxi/Xanadu/Xanadu.html|title=Xanadu home page}}</ref> || Imperative || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}}
|}
 
==See also==
*[[Typed lambda calculus]]
 
== Footnotes ==
<references group="fn"/>
 
==References==
{{reflist|2}}
 
==Further reading==
* {{cite book|first=Per|last=Martin-Löf|authorlink=Per Martin-Löf|year=1984|title=Intuitionistic Type Theory|publisher=Bibliopolis|url=http://www.cs.cmu.edu/afs/cs/Web/People/crary/819-f09/Martin-Lof80.pdf}}
* {{cite book|title=Programming in Martin-Löf's Type Theory: An Introduction|first1=Bengt|last1=Nordström|authorlink1=Bengt Nordström|first2=Kent|last2=Petersson|first3=Jan M.|last3=Smith|year=1990|publisher=Oxford University Press|url=http://www.cse.chalmers.se/research/group/logic/book/}}
* {{cite book|editor=S. Abramsky, D. Gabbay and T. Maibaum|first=Henk|last=Barendregt|authorlink=Henk Barendregt|chapter=Lambda calculi with types|chapterurl=ftp://ftp.cs.ru.nl/pub/CompMath.Found/HBK.ps|title=Handbook of Logic in Computer Science|publisher=[[Oxford University Press|Oxford Science Publications]]|year=1992}}
* {{cite journal|first1=Conor|last1=McBride|authorlink1=Conor McBride|first2=James|last2=McKinna|authorlink2=James McKinna|date=January 2004|title=The view from the left|url=http://strictlypositive.org/view.ps.gz|journal=[[Journal of Functional Programming]]|volume=14|issue=1|pages=69&ndash;111}}
* {{cite journal|first1=Thorsten|last1=Altenkirch|authorlink1=Thorsten Altenkirch|first2=Conor|last2=McBride|authorlink2=Conor McBride|first3=James|last3=McKinna|authorlink3=James McKinna|date=April 2005|title=Why dependent types matter|url=http://www.cs.nott.ac.uk/~txa/publ/ydtm.pdf}}
* Norell, Ulf. ''[http://www.cse.chalmers.se/~ulfn/papers/thesis.pdf Towards a practical programming language based on dependent type theory]''. PhD thesis, Department of Computer Science and Engineering, Chalmers University of Technology, SE-412 96 Göteborg, Sweden, September 2007.
* Oury, Nicolas and Swierstra, Wouter (2008). [http://www.cs.ru.nl/~wouters/Publications/ThePowerOfPi.pdf "The Power of Pi"]. Accepted for presentation at ICFP, 2008.
* Norell, Ulf (2008). [http://www.cse.chalmers.se/~ulfn/papers/afp08/tutorial.pdf Dependently Typed Programming in Agda].
 
== External ==
* [http://sneezy.cs.nott.ac.uk/darcs/DTP08/ Dependently Typed Programming 2008]
* [http://sneezy.cs.nott.ac.uk/darcs/dtp10/ Dependently Typed Programming 2010]
* [http://www.cs.ru.nl/dtp11/ Dependently Typed Programming 2011]
* [http://www.haskell.org/haskellwiki/Dependent_type "Dependent type"] at the Haskell Wiki
* {{nlab|id=dependent+type+theory|title=dependent type theory}}
* {{nlab|id=dependent+type|title=dependent type}}
* {{nlab|id=dependent+product+type|title=dependent product type}}
* {{nlab|id=dependent+sum+type|title=dependent sum type}}
* {{nlab|id=dependent+product|title=dependent product}}
* {{nlab|id=dependent+sum|title=dependent sum}}
 
 
{{DEFAULTSORT:Dependent Type}}
[[Category:Dependently typed programming| ]]
[[Category:Type theory]]

Revision as of 20:20, 2 March 2014

I'm Penni and I live in a seaside city in northern Germany, Stade. I'm 39 and I'm will soon finish my study at Integrated International Studies.

my weblog :: how to get free fifa 15 coins