An Extension of Klein's Erlanger Program: Logic as Invariant-Theory