1

I am a complete beginner to SageMath. I was wondering how I could recreate the maximum-minimum identity using it. Any idea?

Cesare
  • 346
  • What do you mean by "recreate"? Do you want to write some code that takes a list of numbers and calculates the max (or min) in both ways, so you can verify they are indeed equal? – HallaSurvivor Jun 25 '20 at 06:13
  • 1
    I would like a system that given the inputs $x_2, \dots, x_N$ gives the whole expansion for max and for min. – Cesare Jun 25 '20 at 06:38
  • Does that mean to calculate the minimum and maximum using the max-min-identity? Something like, def mymax(x): return sum([min(comb)*(-1)^(len(comb)+1) for comb in Combinations(x) if comb]) and def mymin(x): return sum([max(comb)*(-1)^(len(comb)+1) for comb in Combinations(x) if comb])? Or are you looking for a symbolic expansion? – rickhg12hs Jun 26 '20 at 12:35
  • I am looking for a symbolic expantion, where I can then impose condition. But I have no idea whether this is possible in Sage. I think it might be possible in Mathematica. – Cesare Jun 26 '20 at 16:12

0 Answers0