简体   繁体   中英

There is a set of pairs (set_pairs) and I want to create a set (set_fsts) of first elements of those pairs. How can I do this in Isabelle?

There is a set of pairs (set_pairs) and I want to create a set (set_fsts) of first elements of those pairs. I am writing it in the following way

definition "set_fsts = {f. p ∈ set_piars ∧ fst p = f}" but Isabelle shows me this err msg: Extra variable on rhs "p"

Could you please help me with this?

You need to introduce p by existential quantification, ie EX p. P: set_pairs...

Shorter way would be to define set_fsts as fst ` set_pairs

You can try

set_fsts = {fst p . p ∈ set_piars}

This would work in Isabelle/ZF, I am not sure about Isabelle/HOL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM