, If ?x:?.? = ? ? , then ? ? ?x:? .? , for some ? , ? , such that ? = ? ?, and ? = ? ?

, If ? ? r ? = ? ? , then ? ? ? ? r ? , for some ? , ? , such that ? = ? ?, and ? = ? ?

, If ? ? ? = ? ?, then ? ? ? ? ? , for some ? , ? , such that ? = ? ?, and ? = ? ?

, If ? ? ? = ? ?, then ? ? ? ? ? , for some ? , ? , such that ? = ? ?, and ? = ? ?

, If ? ? ?x:?.? : ?x:?.? , then ?, x:? ? ? : ?

, If ? ? ? r x:?.? : ?x:?.? , then ?, x:? ? ? : ? and ? = ? x

?. If, ? ? ? , then ? ? ? 1 : ?, ? ? ? 2 : ? , and ? 1 = ? ? 2

?. If, ?x:? ??.?, then ? ? ? 1 : ?y:?.? (in ? 1 y), ? ? ? 2 : ?y:?.?

, If ? ? pr 1 ? : ?, then ? ? ?:? ? ? , for some ?

, If ? ? pr 2 ? : ? , then ? ? ?:? ? ? , for some ?

, ? ? in ? 1 ? : ? ? ? , then ? ? ? : ? and ? ? ? ? ? : Type

, Axiom backchain : prog ?> atom ?> goal ?> Type

, Axiom solve_impl : forall p1 p2 g, solve (and_2 p1 p2) g ?> solve p1

, > solve p g ?> solve p

, Axiom backchain_impl_impl : forall p a g g1 g2, backchain (impl_2 (and_1 g1 g2) p) a g ?> backchain (impl_2 g1 (impl_2 g2 p)) a g. Axiom backchain_impl_and1 : forall p1 p2 a g g1, backchain (impl_2 g1 p1) a g ?> backchain

, Axiom csapp : forall s t, aOk (crelev s t) >> aOk s >> aOk t. Axiom cpair : forall s t, (aOk s & aOk t) >> aOk (cinter s t). Axiom cpri : forall s t, aOk (cinter s t) >> (aOk s & aOk t), Semantics *) Axiom cabst : forall s t, (aOk s ?> aOk t) >> aOk (carrow s t)

, Axiom ccopair : forall s t, aOk (cunion s t) >> (aOk s | aOk t)

, Using this encoding, we can deeply encode self-application ?x.x x : (? ? (? ? ? )) ? ? and commutativity of union ?x

, Axiom s : o. Axiom t : o. Definition halfomega := cabst (cinter s (carrow s t)) t (fun x ? capp s t (proj_r (cpri s (carrow s t) x)) idpair := cpair (carrow s s) (carrow t t) <cabst s s (fun x ? x)

, We also can show that the commutativity of union with a relevant arrow ?x.x : (? ? ? ) ? r (? ? ?): Definition communion' := csabst (cunion s t) (cunion t s) (sfun x ? smatch ccopair s t x with y ?

, Axiom sup' : Type. Axiom same : obj' & fam' & knd' & sup'. Axiom term : (obj' | fam' | knd' | sup') ?> Type. (* The obj, fam, knd, and sup types have the same essence (term same) *) Definition obj := term (coe (obj' | fam' | knd' | sup') (coe obj' same)). Definition fam := term (coe (obj' | fam' | knd' | sup') (coe fam' same)). Definition knd := term (coe (obj' | fam' | knd' | sup') (coe knd' same)), A shallow encoding of LF in LF ? making essential use of intersection types can be also type checked. The corresponding Bull code is the following: Axiom obj' : Type. Axiom fam' : Type. Axiom knd' : Type

, Axiom tp : knd & sup

, star and sqre have the same essence (tp) *) Definition star := coe knd tp. Definition sqre := coe sup tp

, Axiom lam : (fam ?> (obj ?> obj) ?> obj) & (fam ?> (obj ?> fam) ?> fam). Definition lam_1 := coe (fam ?> (obj ?> obj) ?> obj) lam. Definition lam_2 := coe (fam ?> (obj ?> fam) ?> fam) lam

, Axiom pi : (fam ?> (obj ?> fam) ?> fam) & (fam ?> (obj ?> knd) ?> knd). Definition pi_1 := coe (fam ?> (obj ?> fam) ?> fam) pi. Definition pi_2 := coe (fam ?> (obj ?> knd) ?> knd) pi

, Axiom app : (obj ?> obj ?> obj) & (fam ?> obj ?> fam)

, Axiom of_ax : of_3 star sqre

, Axiom of_lam : of_lam1 & of_lam2. (* Rules for product are ''essentially'' the same *) Definition of_pi1 := forall t1 t2, Rules for lambda-abstraction are "essentially" the same *) Definition of_lam1 := forall t1 t2 t3, of_2 t1 star ?> (forall x, of_1 x t1 ?> of_1 (t2 x) (t3 x)) ?> of_1 (lam_1 t1 t2) (pi_1 t1 t3). Definition of_lam2 := forall t1 t2 t3, of_2 t1 star ?> (forall x, of_1 x t1 ?> of_2 (t2 x) (t3 x)) ?> of_2

. Ok-s-?&gt;-ok-t-?&gt;-prop, Axiom Eqrefl : forall (s : o) (M : OK s), Eq s s M M. Axiom Eqsymm : forall (s t : o) (M : OK s) (N : OK t), Eq s t M N ?> Eq t s N M. Axiom Eqtrans : forall

, Axiom Abst : forall (s t : o), (( OK s) ?> (OK t)) ?> OK (arrow s t)

, OK (arrow s t) ?> OK s ?> OK t. (* constructors for intersection *) Axiom Proj_l : forall (s t : o), OK (inter s t) ?> OK s. Axiom Proj_r : forall (s t : o), Axiom App : forall (s t : o)

, Axiom Pair : forall (s t : o) (M : OK s) (N : OK t), Eq s t M N ?> OK

, constructors for union *) Axiom Inj_l : forall (s t : o), OK s ?> OK (union s t)

, Axiom Inj_r : forall (s t : o), OK t ?> OK (union s t)

, Axiom Sum : forall

, M : OK s ?> OK t) (N : OK s' ?> OK t'), (forall (x : OK s) (y : OK s'), Eq s s' x y ?> Eq t t' (M x) (N y)) ?> Eq (arrow s t) (arrow s' t') (Abst s t M, Axiom Eqabst : forall (s t s' t' : o)

, M : OK (arrow s t)) (N : OK s) (M' : OK (arrow s' t')) (N' : OK s'), Eq (arrow s t) (arrow s' t') M M' ?> Eq s s' N N' ?> Eq t t, Axiom Eqapp : forall (s t s' t' : o)

, * define equality wrt intersection constructors *) Axiom Eqpair : forall (s t : o) (M : OK s) (N : OK t) (pf : Eq s t M N), Eq (inter s t) s (Pair s t M N pf) M. Axiom Eqproj_l : forall (s t : o) (M : OK (inter s t)), Eq

, Axiom Eqproj_r : forall (s t : o) (M : OK (inter s t)), Eq (inter s t) t M (Proj_r s t M)

, * define equality wrt union *) Axiom Eqinj_l : forall (s t : o) (M : OK s), Eq (union s t) s (Inj_l s t M) M. Axiom Eqinj_r : forall (s t : o) (M : OK t), Eq (union s t) t (Inj_r s t M) M. Axiom Eqsum : forall (s t u : o) (M : OK (arrow s u)) (N : OK (arrow t u)) (O : OK (union s t)) (pf: Eq (arrow s u) (arrow t u) M N) (x : OK s)

A. Aiken, Introduction to set constraint-based program analysis, Science of Computer Programming, vol.35, issue.2, pp.79-111, 1999.

A. Aiken and E. L. Wimmers, Type inclusion constraints and type inference, Functional Programming languages and Computer Architecture (FPCA), pp.31-41, 1993.

F. Alessi and F. Barbanera, Strong conjunction and intersection types, Mathematical Foundations of Computer Science (MFCS), pp.64-73, 1991.

F. Alessi, F. Barbanera, and M. Dezani-ciancaglini, Intersection types and lambda models, Theoretical Computer Science, vol.355, issue.2, pp.108-126, 2006.

A. Asperti, W. Ricciotti, C. Sacerdoti-coen, and E. Tassi, A compact kernel for the calculus of inductive constructions, Sadhana, vol.34, issue.1, pp.71-144, 2009.

A. Asperti, W. Ricciotti, C. Sacerdoti-coen, and E. Tassi, A bi-directional refinement algorithm for the calculus of (co)inductive constructions, Logical Methods in Computer Science, vol.8, issue.1, 2012.

F. Barbanera, M. Dezani-ciancaglini, and U. De&apos;liguoro, Intersection and union types: syntax and semantics. Information and Computation, vol.119, pp.202-230, 1995.

F. Barbanera and S. Martini, Proof-functional connectives and realizability. Archive for Mathematical Logic, vol.33, pp.189-211, 1994.

H. Barendregt, The Lambda Calculus: Its Syntax and Semantics, Studies in Logic and the Foundations of Mathematics. North-Holland, vol.103, 1984.

H. Barendregt, Lambda-calculi with types, Handbook of Logic in Computer Science, vol.2, pp.117-309, 1992.

H. Barendregt, M. Coppo, and M. Dezani-ciancaglini, A filter lambda model and the completeness of type assignment, Journal of Symbolic Logic, vol.48, issue.4, pp.931-940, 1983.

H. Barendregt, W. Dekkers, and R. Statman, Lambda calculus with types, 2013.

C. Ben-yelles, Type assignment in the lambda-calculus: syntax and semantics, 1979.

S. Berardi, Towards a mathematical analysis of the Coquand-Huet calculus of constructions and the other systems in Barendregt's cube, 1988.

Y. Bertot and P. Castéran, Interactive theorem proving and program development: Coq'Art: the calculus of inductive constructions, 2013.
URL : https://hal.archives-ouvertes.fr/hal-00344237

J. Bessai, Extracting a formally verified Subtyping Algorithm for Intersection Types from Ideals and Filters. Talk at TYPES, slides, 2016.

O. Boite, Proof reuse with extended inductive types, Theorem Proving in Higher Order Logics (TPHOLs), pp.50-65, 2004.
URL : https://hal.archives-ouvertes.fr/hal-01124944

V. Bono, B. Venneri, and L. Bettini, A typed lambda calculus with intersection types, Theoretical Computer Science, vol.398, issue.1-3, pp.95-113, 2008.

G. Boole, The Mathematical Analysis of Logic, being an essay towards a calculus of deductive reasoning, 1847.

K. B. Bruce, R. D. Cosmo, and G. Longo, Provable isomorphisms of types, Mathematical Structures in Computer Science, vol.2, issue.2, pp.231-247, 1992.

A. Bucciarelli, A. Piperno, and I. Salvo, Intersection types and ?definability, Mathematical Structures in Computer Science, vol.13, issue.1, pp.15-53, 2003.

B. Capitani, M. Loreti, and B. Venneri, Hyperformulae, Parallel Deductions and Intersection Types, Electronic Notes in Theoretical Computer Science, vol.50, issue.2, pp.180-198, 2001.

J. E. Caplan and M. T. Harandi, A logical framework for software proof reuse, Symposium on Software Reusability (SSR), pp.106-113, 1995.

L. Cardelli and P. Wegner, On understanding types, data abstraction, and polymorphism, ACM Computing Surveys, vol.17, issue.4, pp.471-523, 1985.

I. Cervesato and F. Pfenning, A linear spine calculus, Journal of Logic and Computation, vol.13, issue.5, pp.639-688, 2003.

A. Chlipala, Certified Programming with Dependent Types -A Pragmatic Introduction to the Coq Proof Assistant, 2013.

M. Coppo and M. Dezani-ciancaglini, An extension of the basic functionality theory for the ?-calculus, Notre Dame Journal of Formal Logic, vol.21, issue.4, pp.685-693, 1980.

M. Coppo, M. Dezani-ciancaglini, and P. Sallé, Functional characterization of some semantic equalities inside ?-calculus, International Colloquium on Automata, Languages, and Programming (ICALP), pp.133-146, 1979.

M. Coppo, M. Dezani-ciancaglini, and B. Venneri, Functional characters of solvable terms, Zietschrift für Mathematische Logik und Grundlagen der Mathematik, vol.27, pp.45-58, 1981.

T. Coquand and G. Huet, The calculus of constructions. Information and Computation, vol.76, pp.95-120, 1988.
URL : https://hal.archives-ouvertes.fr/inria-00076024

H. B. Curry, Functionality in combinatory logic, Proceedings of the National Academy of Sciences of the United States of America, vol.20, p.584, 1934.

F. Damm, Subtyping with union types, intersection types and recursive types, Theoretical and Applied Computer Science (TACS), pp.687-706, 1994.
URL : https://hal.archives-ouvertes.fr/inria-00074412

R. Davies, Practical Refinement-Type Checking, 2005.

N. G. De-bruijn, Automath, a language for mathematics, 1968.

N. G. De-bruijn, Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the church-rosser theorem, Indagationes Mathematicae (Proceedings), vol.34, pp.381-392, 1972.

C. Inria, L. Lix, and P. , The Coq development team, 2019.

M. Dezani-ciancaglini, S. Ghilezan, and B. Venneri, The "relevance" of intersection and union types, Notre Dame Journal of Formal Logic, vol.38, issue.2, pp.246-269, 1997.

R. Di and C. , Isomorphisms of types: from ?-calculus to information retrieval and language design, 1995.

D. J. Dougherty, U. De&apos;liguoro, L. Liquori, and C. Stolze, A realizability interpretation for intersection and union types, Asian Symposium on Programming Languages and Systems (APLAS), vol.10017, pp.187-205, 2016.
URL : https://hal.archives-ouvertes.fr/hal-01317213

J. Daniel, L. Dougherty, and . Liquori, Logic and computation in a lambda calculus with intersection and union types, Logic Programming and Automated Reasoning (LPAR), vol.6355, pp.173-191, 2010.

G. Dowek, T. Hardin, and C. Kirchner, Higher order unification via explicit substitutions. Information and Computation, vol.157, pp.183-235, 2000.
URL : https://hal.archives-ouvertes.fr/inria-00077197

A. Dudenhefner, M. Martens, and J. Rehof, The intersection type unification problem, Formal Structures for Computation and Deduction (FSCD)

, Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2016.

A. Dudenhefner, M. Martens, and J. Rehof, The algebraic intersection type unification problem, Logical Methods in Computer Science, vol.13, issue.3, 2017.

J. Dunfield, Refined typechecking with Stardust, Programming Languages meets Program Verification (PLPV), pp.21-32, 2007.

J. Dunfield, Elaborating intersection and union types, Journal of Functional Programming, vol.24, issue.2-3, pp.133-165, 2014.

J. Dunfield and F. Pfenning, Tridirectional typechecking, Principles of Programming Languages (POPL), pp.281-292, 2004.

A. Felty and D. J. Howe, Generalization and reuse of tactic proofs, Logic Programming and Automated Reasoning (LPAR), pp.1-15, 1994.

T. Freeman and F. Pfenning, Refinement types for ML, Programming Language Design and Implementation (PLDI), pp.268-277, 1991.

A. Frisch and . Cduce, , 2019.

A. Frisch, G. Castagna, and V. Benzaken, Semantic subtyping: Dealing set-theoretically with function, union, intersection, and negation types, Journal of the ACM, vol.55, issue.4, p.19, 2008.
URL : https://hal.archives-ouvertes.fr/hal-00336120

G. Gentzen, Untersuchungen über das logische Schließen I, Mathematische Zeitschrift, vol.39, issue.1, pp.176-210, 1935.

R. Harper, F. Honsell, and G. Plotkin, A framework for defining logics, Journal of the ACM, vol.40, issue.1, pp.143-184, 1993.

R. Harper and D. R. Licata, Mechanizing metatheory in a logical framework, Journal of Functional Programming, vol.17, issue.4-5, pp.613-673, 2007.

J. and R. Hindley, The simple semantics for Coppo-Dezani-Sallé types, International Symposium on Programming, pp.212-226, 1982.

J. and R. Hindley, Coppo-Dezani types do not correspond to propositional logic, Theoretical Computer Science, vol.28, pp.235-236, 1984.

F. Honsell, M. Lenisa, L. Liquori, and I. Scagnetto, Implementing Cantor's paradise, Asian Symposium on Programming Languages and Systems (APLAS), pp.229-250, 2016.

F. Honsell, L. Liquori, C. Stolze, and I. Scagnetto, The Deltaframework, Foundations of Software Technology and Theoretical Computer Science (FSTTCS), vol.37, pp.1-37, 2018.

W. A. Howard, The Formulae-as-Types Notion of Construction, To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pp.479-490, 1980.

G. Huet, A unification algorithm for typed lambda-calculus, Theoretical Computer Science, vol.1, issue.1, pp.27-57, 1975.

A. Kfoury and J. B. Wells, Principality and type inference for intersection types using expansion variables, Theoretical Computer Science, vol.311, issue.1-3, pp.1-70, 2004.

A. Kopylov, Dependent intersection: a new way of defining records in type theory, Logic in Computer Science (LICS), pp.86-95, 2003.

L. Liquori, A. Nuyts, and C. Stolze, , 2017.

L. Liquori and S. Rocca, Towards an intersection typed system à la Church, Electronic Notes in Theoretical Computer Science, vol.136, pp.43-56, 2005.
URL : https://hal.archives-ouvertes.fr/hal-01149611

L. Liquori and S. Rocca, Intersection typed system à la Church. Information and Computation, vol.9, pp.1371-1386, 2007.
URL : https://hal.archives-ouvertes.fr/hal-01149611

L. Liquori and C. Stolze, A decidable subtyping logic for intersection and union types, Topics In Theoretical Computer Science (TTCS), vol.10608, pp.74-90, 2017.
URL : https://hal.archives-ouvertes.fr/hal-01760641

L. Liquori and C. Stolze, The Delta-calculus: Syntax and types, Formal Structures for Computation and Deduction (FSCD), vol.28, pp.1-28, 2019.

G. K. Edgar and . López-escobar, Proof functional connectives, Methods in Mathematical Logic, vol.1130, pp.208-221, 1985.

D. Macqueen, G. Plotkin, and R. Sethi, An ideal model for recursive polymorphic types, Information and Control, vol.71, issue.1, pp.95-130, 1986.

P. Martin-löf, Intuitionistic type theory, volume 1 of Studies in proof theory. Bibliopolis, 1984.

K. Robert, R. Meyer, and . Routley, Algebraic analysis of entailment I, Logique et Analyse, vol.15, pp.407-428, 1972.

G. Mints, The completeness of provable realizability, Notre Dame Journal of Formal Logic, vol.30, issue.3, pp.420-441, 1989.

A. Miquel, The implicit calculus of constructions, Typed Lambda Calculi and Applications (TLCA), pp.344-359, 2001.

C. Paulin-mohring, Inductive definitions in the system coq rules and properties, Typed Lambda Calculi and Applications (TLCA), pp.328-345, 1993.

F. Pfenning, Refinement types for logical frameworks, TYPES, pp.285-299, 1993.

F. Pfenning and C. Elliott, Higher-order abstract syntax, In ACM SIGPLAN Notices, vol.23, issue.7, pp.199-208, 1988.

F. Pfenning and C. Paulin-mohring, Inductively defined types in the calculus of constructions, Mathematical Foundations of Programming Semantics (MFPS), pp.209-228, 1989.

C. Benjamin and . Pierce, Programming with intersection types, union types, and bounded polymorphism, 1991.

C. Benjamin and . Pierce, Programming with intersection types, union types, and polymorphism, 1991.

E. Pimentel, S. Rocca, and L. Roversi, Intersection types from a proof-theoretic perspective, Fundamenta Informaticae, vol.121, issue.1-4, pp.253-274, 2012.

G. Pottinger, A type assignment for the strongly normalizable ?-terms, To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pp.561-577, 1980.

J. Reed, Higher-order constraint simplification in dependent type theory, Logical Frameworks and Meta-Languages: Theory and Practice (LFMTP), pp.49-56, 2009.

J. Rehof and P. Urzyczyn, The complexity of inhabitation with explicit intersection, Logic and Program Semantics -Essays Dedicated to Dexter Kozen on the Occasion of His 60th Birthday, pp.256-270, 2012.

J. C. Reynolds, Preliminary design of the programming language Forsythe, 1988.

D. Simona-ronchi, L. Rocca, and . Roversi, Intersection logic, Computer Science Logic (CSL), vol.2142, pp.421-428, 2001.

B. Russell, The Principles of Mathematics, 1903.

V. Siles and H. Herbelin, Equality is typable in semi-full pure type systems, Logic in Computer Science (LICS), pp.21-30, 2010.
URL : https://hal.archives-ouvertes.fr/inria-00496988

C. Stolze and . Bull, , 2019.

C. Stolze, L. Liquori, F. Honsell, and I. Scagnetto, Towards a logical framework with intersection and union types, Logical Frameworks and Metalanguages: Theory and Practice (LFMTP), pp.1-9, 2017.
URL : https://hal.archives-ouvertes.fr/hal-01534035

A. Stump, From realizability to induction via dependent intersection, Annals of Pure and Applied Logic, vol.169, issue.7, pp.637-655, 2018.

M. Takahashi, Parallel reductions in ?-calculus. Information and computation, vol.118, pp.120-127, 1995.

V. Tannen, T. Coquand, C. A. Gunter, and A. Scedrov, Inheritance as implicit coercion. Information and Computation, vol.93, pp.172-221, 1991.

P. Urzyczyn, The emptiness problem for intersection types, Journal of Symbolic Logic, vol.64, issue.3, pp.1195-1215, 1999.

. Steffen-van-bakel, Cut-elimination in the strict intersection type assignment system is strongly normalizing, Notre Dame Journal of Formal Logic, vol.45, issue.1, pp.35-63, 2004.

B. Venneri, Intersection types as logical formulae, Journal of Logic and Computation, vol.4, issue.2, pp.109-124, 1994.

J. B. Wells, A. Dimock, R. Muller, and F. Turbak, A calculus with polymorphic and polyvariant flow types, Journal of Functional Programming, vol.12, issue.3, pp.183-227, 2002.

J. B. Wells and C. Haack, Branching types, European Symposium on Programming, vol.2305, pp.115-132, 2002.

B. Ziliani and M. Sozeau, A unification algorithm for Coq featuring universe polymorphism and overloading, ACM SIGPLAN Notices, volume, vol.50, issue.9, pp.179-191, 2015.
URL : https://hal.archives-ouvertes.fr/hal-01248804