Overview Schemas Index

SET_THEORY_SCHEMA (jsdai.SSet_theory_schema)


FUNCTION identical_to_one_of_set_of_sets
          (set_a : class, set_of_sets : SET [0:?] OF class) : BOOLEAN;

 LOCAL i : INTEGER  ; initial_size : INTEGER  ; augmented_size : INTEGER ; set_of_forward_equivalences : SET  OF  same_membership := [ ] ; set_of_backward_equivalences : SET  OF  same_membership := [ ] ; augmented_set_of_sets : SET OF class := [ ] ; END_LOCAL ; IF  ( set_a IN set_of_sets ) THEN  RETURN  ( TRUE ) ; END_IF  ; initial_size := SIZEOF  ( set_of_sets ) ; IF  ( initial_size = 0 ) THEN  RETURN  ( FALSE  ) ; END_IF  ; REPEAT  i := 1 TO  initial_size ; set_of_forward_equivalences := set_of_forward_equivalences + USEDIN  ( set_of_sets [ i ] , 'set_theory_schema.same_membership.set_1' ) ; set_of_backward_equivalences := set_of_forward_equivalences + USEDIN ( set_of_sets [ i ] , 'set_theory_schema.same_membership.set_2' ) ; END_REPEAT  ; augmented_set_of_sets := set_of_sets ; IF  ( SIZEOF  ( set_of_forward_equivalences ) > 0 ) THEN  REPEAT  i := 1 TO  HIINDEX  ( set_of_forward_equivalences ) ; augmented_set_of_sets := augmented_set_of_sets + set_of_forward_equivalences [ i ] . set_2 ; END_REPEAT  ; END_IF  ; IF  ( SIZEOF  ( set_of_backward_equivalences ) > 0 ) THEN  REPEAT i := 1 TO HIINDEX ( set_of_backward_equivalences ) ; augmented_set_of_sets := augmented_set_of_sets + set_of_backward_equivalences [ i ] . set_1 ; END_REPEAT ; END_IF  ; augmented_size := SIZEOF ( augmented_set_of_sets ) ; IF augmented_size = initial_size THEN RETURN  ( FALSE ) ; END_IF ; RETURN ( identical_to_one_of_set_of_sets ( set_a , augmented_set_of_sets ) ) ; 

END_FUNCTION; -- identical_to_one_of_set_of_sets

public class FIdentical_to_one_of_set_of_sets
          public static Value run(SdaiContext _context, Value set_a, Value set_of_sets)