(* Title: HoTT/Proj.thy Author: Josh Chen Date: Jun 2018 Projection functions \fst\ and \snd\ for the dependent sum type. *) theory Proj imports HoTT_Methods Prod Sum begin abbreviation fst :: "Term \ Term" where "fst \ \p. ind\<^sub>\(\x y. x)(p)" abbreviation snd :: "Term \ Term" where "snd \ \p. ind\<^sub>\(\x y. y)(p)" text "Typing judgments and computation rules for the dependent and non-dependent projection functions." lemma assumes "\x:A. B(x): U(i)" and "p: \x:A. B(x)" shows "fst(p): A" by (derive lems: assms end