Question: evalb and sets of eqations


Sorozatok_q1:= proc()

    local solved, n, l, k, s_n, eq1, eq2, `a[1]`, d, MO, ret_length:

    solved := false:

    randomize():

    while ( (not solved) or hasfun([MO], RootOf) ) do

      n   := RandomTools:-Generate(integer(range=5..20)):

      l   := RandomTools:-Generate(integer(range=2..n)):

      k   := RandomTools:-Generate(integer(range= 1..(l-1) )):

      s_n := RandomTools:-Generate(integer(range=5..30)):

      eq1 := abs( `a[1]` +(k-1)*d ) = abs( `a[1]`+(l-1)*d );

      eq2 := n * ( `a[1]` + (`a[1]` + (n-1)*d) )/2 = s_n;

      MO  := solve( [eq1,eq2], [`a[1]`,d], Explicit=true ):

      if not ( MO = [] ) then

         solved := true:

       end if:

    end do:

    ret_length := 4 + nops([MO]):

    return [ret_length, n, k, l, s_n, MO];

  end proc:

Out := Sorozatok_q1();

Out := [5, 9, 3, 9, 28, [[`a[1]` = 28/9, d = 0], [`a[1]` = 140/9, d = -28/9]]]

Out[-1];

[[`a[1]` = 28/9, d = 0], [`a[1]` = 140/9, d = -28/9]]

Solseq1 := op(map(xxx -> convert(xxx,set), Out[-1]));

Solseq1 := {`a[1]` = 28/9, d = 0}, {`a[1]` = 140/9, d = -28/9}

# copy-paste here the value of Solseq1 from the the previous output line:

Solseq2 := {`a[1]` = 28/9, d = 0}, {`a[1]` = 140/9, d = -28/9};

Solseq2 := {`a[1]` = 28/9, d = 0}, {`a[1]` = 140/9, d = -28/9}

evalb( {Solseq1} = {Solseq2});

false

Solseq1[1];

{`a[1]` = 28/9, d = 0}

Solseq2[1];

{`a[1]` = 28/9, d = 0}

evalb( Solseq1[1] = Solseq2[1] );

false

# copy-paste here the previous 2 ( identical :) sets:

evalb({`a[1]` = 28/9, d = 0} = {`a[1]` = 28/9, d = 0});

true

 


Download set-evalb.mw

Why do we get the "false "outputs here?

Please Wait...