Suppose I have a current carrying solenoid with a strong magnetic field inside and outside it. Now I bring a good compass inside that solenoid now I would like you to tell me the direction of North Pole of that compass in which it will get deflected, either towards the South Pole or North Pole of the solenoid.
Now , please see these two cases:
If the North Pole of compass is attracted towards the South Pole of solenoid because like poles repel and unlike poles attract, then it violates the fact that magnetic field lines run from South to North Pole inside a magnet because we used compass analogy to define the direction of magnetic field lines and
as compass needle pointed from North to South Pole outside the magnet we said that magnetic field lines run from North to South Pole outside a magnet . Now as the needle pointed towards South Pole inside the solenoid why didn't we said that the field lines run from North to South Pole inside a magnet too as we did outside the magnet using compass analogy?
Now if the North Pole of compass points towards the North Pole of solenoid according to field lines concept
the direction of magnetic field lines inside a solenoid is from South to North Pole. Now this violates the fact that like poles repel and unlike poles attract.
So what really happens?