Lagrange's Theorem Proof how to multiply sqrt(-1) values for subgroup H[1,i] (((GROUP THEORY))))
Title
Question
PROGRAM FOR H=[1,-1]
clear;
clc;
G=[1,-1,sqrt(-1),-sqrt(-1)];
H=[1,-1]
i=1;
if H(i)*H(i+1)==H(i)|H(i)*H(i+1)==H(i+1) then
if H(i)*H(i)==H(i)|H(i)*H(i)==H(i+1) then
if H(i+1)*H(i+1)==H(i)|H(i+1)*H(i+1)==H(i+1) then
printf("H is closed under multiplication\\n");
else
printf("H is not closed and hence H is not a group");
abort;
end
end
end
if H(i)*H(i)==H(i) & H(i+1)*H(i)==H(i+1) then
e=H(i);
printf("e=%f is an unique identity element \\n",H(i));
else if H(i)*H(i+1)==H(i) & H(i+1)*H(i+1)==H(i+1) then
e=H(i+1);
printf("e=%f is an unique identity element \\n",H(i+1));
else
printf("No identity element exists \\n H is not a group \\n");
abort;
end
end
in1=e/H(i)
in2=e/H(i+1)
if in1==H(i)|in1==H(i+1) then
printf("i=%f is an unique inverse element of %d \\n",in1,H(i));
if in2==H(i)|in2==H(i+1) then
printf("i=%f is an unique inverse element of %d \\n",in2,H(i+1));
else
printf("No inverse element exists \\n H is not a group \\n");
abort
end
end
printf("H satisfies all three axioms under multiplication \\n");
printf("Hence H is a group \\n");
printf("H is a subset of group G implies H is a subgroup of G\\n");
printf("Lagranges theorem : O(H) divides O(G)\\n");
n=length(G);
m=length(H);
printf("Order of G=%d\\n",n);
printf("Order of H=%d\\n",m);
k=n/m;
if modulo(n,m)==0 then
printf("O(G)/O(H)=%d",k);
printf("\\n Hence Lagranges theorem holds\\n");
printf("Hence H is a subgroup of G\\n");
else
printf("%d is not a divisor\\n",k);
printf("\\n Hence Lagranges theorem does not holds\\n");
printf("Hence H is not a subgroup of G\\n");
end
<font size="6">This works </font>
<font size="6">
</font>
</font>
<font size="6">but </font>
<font size="6">
</font>
</font>
<font size="6">when H=[1,%i] ,[1,-%i] it does not work , it says this</font>
<span style="line-height: 21.4285717010498px;">"H is not closed and hence H is not a group"</span>
<font size="6">
</font>
</font>
<font size="6">and the entire program aborts .......can someone please help with this ??????</font>
Scilab General
Answers:
Hi Vidhuantony,
The condition in line 9 is not satisfied due to which the message is displayed. Re-check the logic of the code and execute.
For both the of H values with %i values, your statement H(i+1)*H(i+1)==H(i)|H(i+1)*H(i+1)==H(i+1)
returns F as the result. You can easily check that it is false. For example, here is the result of a session:
H = [1,%i]
H =
1. i
H(i)*H(i+1)==H(i)|H(i)*H(i+1)==H(i+1)
ans =
T
H(i)*H(i)==H(i)|H(i)*H(i)==H(i+1)
ans =
T
H(i+1)*H(i+1)==H(i)|H(i+1)*H(i+1)==H(i+1)
ans =
F
By hand calculation, you can check that the answer given by Scilab is correct.
Before you write a complicated problem, please do the calculation by hand for simple test cases, and verify that your logic is correct. If your logic is incorrect, no program can give a correct answer.
returns F as the result. You can easily check that it is false. For example, here is the result of a session:
H = [1,%i]
H =
1. i
H(i)*H(i+1)==H(i)|H(i)*H(i+1)==H(i+1)
ans =
T
H(i)*H(i)==H(i)|H(i)*H(i)==H(i+1)
ans =
T
H(i+1)*H(i+1)==H(i)|H(i+1)*H(i+1)==H(i+1)
ans =
F
By hand calculation, you can check that the answer given by Scilab is correct.
Before you write a complicated problem, please do the calculation by hand for simple test cases, and verify that your logic is correct. If your logic is incorrect, no program can give a correct answer.
Login to add comment