1

Assume that add is a function and {(x,y). e x y = 0} is certain set. I want to show (schematically) that:

lemma 
  assumes "∃ b. 1/c = b^2" "¬ (∃ b. b ≠ 0 ∧ 1/d = b^2)"
  shows "group {(x,y). e x y = 0} add"

so under certain conditions the set and the operation give a group. My doubt is how to phrase this in Isabelle. I was reading the locale tutorial of the documentation but I don't see very well how to write it.

user1868607
  • 2,558
  • 1
  • 17
  • 38
  • I am not certain if I understand the purpose of the assumptions in the lemma that you provided: it seems that `c` and `d` are not used in the goal that you are trying to prove. With regard to your question, there are several ways to demonstrate if a given object is a group in Isabelle. Usually, you wish to interpret one of the existing locales/classes that are meant to represent a group. I believe that the most commonly used locales/classes are `group` and `group_add` from the theory Groups in the main HOL library and the locale `group` from the theory `Group` in `HOL-Algebra`. – user9716869 - supports Ukraine Jun 28 '19 at 13:37
  • If `{(x,y). e x y = 0}` is meant to represent a carrier set associated with the group, then you will need to use the locale `group` from `HOL-Algebra`, because the locales/classes in the main HOL library are only suitable for the interpretation of groups on the set of all terms of a given type. Also, see https://stackoverflow.com/questions/56375156/how-to-pass-assumptions-to-interpretation-of-locale/56384833#56384833 and the associated references. – user9716869 - supports Ukraine Jun 28 '19 at 13:41
  • @xanonec are you aware of the existence of an abelian group locale? – user1868607 Jun 28 '19 at 13:42
  • Indeed, the locale `comm_group` from `HOL-Algebra` and the class `ab_group_add` from the theory Groups in the main HOL library, depending on whether you need to use an explicit carrier set or not. – user9716869 - supports Ukraine Jun 28 '19 at 13:46

1 Answers1

1

Here is the way to write it:

lemma group_law:
  assumes "∃ b. 1/c = b^2" "¬ (∃ b. b ≠ 0 ∧ 1/d = b^2)"
  shows "comm_group ⦇carrier = {(x,y). e x y = 0}, mult = add, one = (1,0)⦈" 

you may also see the general theory and how does one prove the result here:

https://github.com/rjraya/Isabelle/blob/master/curves/Hales.thy

user1868607
  • 2,558
  • 1
  • 17
  • 38