theory Foo imports Main begin locale nondegenerate = fixes dummy :: 'a assumes is_nondegenerate: "\x :: 'a. x \ undefined" (* The above produces in the output window: locale nondegenerate fixes dummy :: "'a" assumes "nondegenerate TYPE('a)" *) context begin interpretation nondegenerate \undefined :: bool\ (* proof (prove) goal (1 subgoal): 1. nondegenerate TYPE(bool) *) proof obtain f :: "bool \ bool" where f: "inj f" using inj_on_id2 by blast show "\x :: bool. x \ undefined" by blast qed lemma bool_is_nondegenerate: shows "nondegenerate (undefined :: bool)" (* Type unification failed: Clash of types "bool" and "_ itself" Type error in application: incompatible operand type Operator: nondegenerate :: ??'a itself \ bool Operand: undefined :: bool *) lemma bool_is_nondegenerate: shows "nondegenerate (undefined :: bool itself)" using nondegenerate_axioms apply blast (* theorem bool_is_nondegenerate: nondegenerate undefined Failed to apply initial proof method\<^here>: using this: nondegenerate TYPE(bool) goal (1 subgoal): 1. nondegenerate undefined In this case, Ctrl-hover in the output window over the "undefined" in the goal shows "constant: HOL.undefined". *) oops lemma bool_is_nondegenerate: shows "nondegenerate TYPE(bool)" .. (* theorem bool_is_nondegenerate: nondegenerate TYPE(bool) *) end context begin interpretation nondegenerate \undefined :: bool\ using bool_is_nondegenerate by blast (* Succeeds. *) end end