I need a little help in formulating the correct logic for a set of equations. There are 19 variables with relationships as follows. {p1, p2, ....p19} where {p1, {p2, p4, p5}}. In relation to this the logic is as follows:- p1 has 3 dependents and p1 can be any integer from 1 to 4, the 3 dependents have to take values from 1 to p1-1, any unset variables can be any integer from 1 to 7. . p2 has 4 dependents and as such p2 can be any value from 1 to 5 and it's 4 dependent variables have to include the integers 1 to p2-1 and any unset variable can be any value from 1 to 7. and finally p5 has 6 dependent variables so p5 can be any value from 1 to 7 and it's 6 dependents must contain values from 1 to p5-1 and any unset variable can be any value from 1 to 7. there is a total sum of all 19 variables.
I am not sure if my logic is correct, here is a small part of my system of equations the full set is many lines long.
Solve[{p1 >= p2 || p1 >= p4 || p1 >= p5,
p2 >= p3 || p2 >= p1 || p2 >= p5 || p2 >= p6,
p3 >= p2 || p3 >= p6 || p3 >= p7,....p1 > 0, p2 > 0, p3 > 0,.....p1 + p2 + p3 + p4 + p5 +....==58,p1 <= 4, p3 <= 4,....,p10 <= 7, p11 <= 7},{p1, p2, p3, p4, p5, p6,...},Integers]
UPDATE:
Solve[{p1 >= p2, p1 >= p4, p1 >= p5, p2 >= p3, p2 >= p1, p2 >= p5,
p2 >= p6, p3 >= p2, p3 >= p6, p3 >= p7, p4 >= p5, p4 >= p1,
p4 >= p8, p4 >= p9, p5 >= p6, p5 >= p4, p5 >= p1, p5 >= p2,
p5 >= p9, p5 >= p10, p6 >= p7, p6 >= p5, p6 >= p2, p6 >= p3,
p6 >= p10, p6 >= p11, p7 >= p6, p7 >= p3, p7 >= p11, p7 >= p12,
p8 >= p9, p8 >= p4, p8 >= p13, p9 >= p10, p9 >= p8, p9 >= p5,
p9 >= p4, p9 >= p14, p9 >= p13, p10 >= p11, p10 >= p9, p10 >= p6,
p10 >= p5, p10 >= p15, p10 >= p14, p11 >= p12, p11 >= p10,
p11 >= p7, p11 >= p6, p11 >= p16, p11 >= p15, p12 >= p11,
p12 >= p7, p12 >= p16, p13 >= p14, p13 >= p8, p13 >= p9,
p13 >= p17, p14 >= p15, p14 >= p13, p14 >= p9, p14 >= p10,
p14 >= p18, p14 >= p17, p15 >= p16, p15 >= p14, p15 >= p10,
p15 >= p11, p15 >= p19, p15 >= p18, p16 >= p15, p16 >= p11,
p16 >= p12, p16 >= p19, p17 >= p18, p17 >= p13, p17 >= p14,
p18 >= p19, p18 >= p17, p18 >= p14, p18 >= p15, p19 >= p18,
p19 >= p15, p19 >= p16, p1 > 0, p2 > 0, p3 > 0, p4 > 0, p5 > 0,
p6 > 0, p7 > 0, p8 > 0, p9 > 0, p10 > 0, p11 > 0, p12 > 0, p13 > 0,
p14 > 0, p15 > 0, p16 > 0, p17 > 0, p18 > 0, p19 > 0,
p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + p9 + p10 + p11 + p12 + p13 +
p14 + p15 + p16 + p17 + p18 + p19 == 58, p1 <= 4, p3 <= 4,
p8 <= 4, p12 <= 4, p17 <= 4, p19 <= 4, p2 <= 5, p4 <= 5, p7 <= 5,
p13 <= 5, p16 <= 5, p18 <= 5, p10 <= 7, p11 <= 7, p14 <= 7,
p15 <= 7, p5 <= 7, p6 <= 7, p9 <= 7}, {p1, p2, p3, p4, p5, p6, p7,
p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19}, Integers]
Within a minute or so all 32 gb of memory has been used and a few minutes later the kernel shuts down.